Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Not Found" api response needed instead of 404 #454

Closed
erolg opened this issue Jun 12, 2016 · 2 comments
Closed

"Not Found" api response needed instead of 404 #454

erolg opened this issue Jun 12, 2016 · 2 comments

Comments

@erolg
Copy link

erolg commented Jun 12, 2016

When we sent request that is not correct (typo, deleted backend etc.) return 404

``/api/providers/docker/backends/backend-whoam -> 404

If it returns to "Not Found" json object, I think could be more usefull to handle response.

@samber
Copy link
Contributor

samber commented Jun 21, 2016

Hi @erolg

Do you mean returning a json instead of a raw string ?

Something like :

{
    "error": 404,
    "message": "Not found"
}

You can already handle the error using the returned status code ;-)

@emilevauge
Copy link
Member

As @samber said, traefik already returns a 404 status code. As there is no standard on how to format errors in a JSON response, I prefer to stay simple for now and use status codes :)

@traefik traefik locked and limited conversation to collaborators Sep 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants