Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

api: Better invalid path error handler #548

Merged
merged 1 commit into from Oct 18, 2016
Merged

api: Better invalid path error handler #548

merged 1 commit into from Oct 18, 2016

Conversation

lpabon
Copy link
Contributor

@lpabon lpabon commented Oct 18, 2016

When a path with an illegal id is provided by the caller (something
that does not match the regexp), the Gorilla Mux Router automatically
routed the call to http.NotFoundHandler(). This would be ok for
an API to handle, but the heketi-cli would output information which
was not very human friendly.

Instead, we now provide our own error handler which returns a nicer
error than just "404: Not found".

Closes #539

Signed-off-by: Luis Pabón lpabon@redhat.com

When a path with an illegal id is provided by the caller (something
that does not match the regexp), the Gorilla Mux Router automatically
routed the call to http.NotFoundHandler().  This would be ok for
an API to handle, but the heketi-cli would output information which
was not very human friendly.

Instead, we now provide our own error handler which returns a nicer
error than just "404: Not found".

Closes heketi#539

Signed-off-by: Luis Pabón <lpabon@redhat.com>
@lpabon
Copy link
Contributor Author

lpabon commented Oct 18, 2016

@heketi/dev Please review when you have time.

@obnoxxx
Copy link
Contributor

obnoxxx commented Oct 18, 2016

Patch looks good to me, 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants