Add global exception handler
Closed this issue · 0 comments
rjrudman commented
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.