fastmail / Ix

automatic generation of JMAP-style APIs
GNU General Public License v2.0
10 stars 5 forks source link

Catch exceptions in main app after database changes have committed #87

Closed wolfsage closed 7 years ago

wolfsage commented 7 years ago

After we've committed database changes, it's possible to throw an exception in log_access/log_transaction and friends. If that happens, we do not want to return a 500 as we already have a prepared good response for the user.

Instead, we should attempt to report these new exceptions, and then return the original response.

rjbs commented 7 years ago

I feel like maybe we could do this more simply, but I have no idea how, so I think I'm full of beans. Merged!