Only updated one controller as a minimal example. Remaining controllers will be updated in a future PR
Overview
There are 2 kinds of errors:
Client errors: Not Found, Bad Request, etc..
Everything else: Internal Server Error
We use a custom error interface ClientError for our errors that have a custom status code. This allows us to create custom error messages, such as those in HandleDBError.
Screenshots
Previously, reading an invalid user gives the wrong status code and output:
Now, reading an invalid user will give the correct result:
coverage: 60.976% (-3.5%) from 64.516% when pulling 1291080eec6338185752fa4c8eea16c00af52648 on add-basic-404-handling into 5bd4e88efd0c4a8b52fc897cda14cd7d18470b69 on main.
Part of #49.
Only updated one controller as a minimal example. Remaining controllers will be updated in a future PR
Overview
There are 2 kinds of errors:
We use a custom error interface
ClientError
for our errors that have a custom status code. This allows us to create custom error messages, such as those inHandleDBError
.Screenshots
Previously, reading an invalid user gives the wrong status code and output:
Now, reading an invalid user will give the correct result: