SOBotics / Higgs

A generic dashboard for viewing and providing feedback to SOBotics bots.
GNU General Public License v3.0
4 stars 0 forks source link

Add global exception handler #44

Closed rjrudman closed 6 years ago

rjrudman commented 6 years ago

Currently, we need to return Error(...) in controllers. This means we can't properly type the controller response, making it awkward for testing. Also, unexpected errors return an HTML page.

We should catch all exceptions thrown, and return a standard format. This also means we can change the controllers to throw errors, rather than return them.