disunity-hq / disunity

A fullstack toolchain for modding Unity games
MIT License
20 stars 4 forks source link

Error Handler Middleware #36

Open scottbot95 opened 5 years ago

scottbot95 commented 5 years ago

In an effort to standardize our error reporting to the client, we should create a custom error handling middleware (see).

This would enable us to simply throw an exception when we want to report an error to the user instead of mucking about with a response factory. The exception we throw probably should contain a StatusCode and maybe some Header information as well to help customize the response.