memeinvestor_bot icon indicating copy to clipboard operation
memeinvestor_bot copied to clipboard

Ensure database operations are completed and successful before replying to requests

Open rickles42 opened this issue 6 years ago • 3 comments

Right now some of the request handlers reply to the user before all the relevant database operations have occurred. If a database operation fails, or if some exception is raised after replying that causes the session to roll back, that would mean we've told the user something happened when in reality it did not.

rickles42 avatar Jun 21 '18 07:06 rickles42

Has this been fixed?

Keanu73 avatar Jun 07 '19 17:06 Keanu73

Kind of. Not as we would like it to be. So, if fail happens, we rollback

thecsw avatar Jun 07 '19 17:06 thecsw

In the Go rewrite, GORM will do all the error handling for us

Keanu73 avatar Jun 12 '19 11:06 Keanu73