Skip to content

HTTP request semantics: reading a non-existent collection should return 404 Not Found instead of 400 Client error #99

@illagrenan

Description

@illagrenan

I think it would be semantically more correct to return a HTTP status code 404 if I'm trying to read a non-existent collection. Now the client gets a 400 client error.

Current behaviour:

> GET /collections/non_existent_collection HTTP/2
> Host: ***
> accept: */*

< HTTP/2 400 
< date: Fri, 24 Sep 2021 11:00:59 GMT
< content-type: application/json
< content-length: 107

According to MDN, I think the 404 code fits perfectly:

The HTTP 404 Not Found client error response code indicates that the server can't find the requested resource.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions