Skip to content

Inconsistent errors when model is not found #282

@ttoino

Description

@ttoino

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium PrioritybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions