You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: