-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
As discussed in this comment and this other comment, when a model is not found a 404 Not Found error should be returned, however, this only happens for a few routes as we're currently using validators to check if a model exists, which return a 422 Unprocessable Entity instead.
Additionally, when a route does return a 404 this is implemented in the function body directly, leading to duplicated code. This could be abstracted out into a middleware.