-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Make RESTful operations return 404 Not Found when the target resource does not exist. #486
Conversation
// RESTStorage is a generic interface for RESTful storage services | ||
// Storages whicih are exported to the RESTful API of apiserver need to implement this interface. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Resources which are exported ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
PTAL |
LGTM |
I'm OK with this, as long as there's the understanding that we'll change it to an error type that carries a suggested HTTP response code with it. I don't want to make an error type for every possible return value and use a switch to decide what to return. I actually was moving in that direction with the api.Status struct, which has a "Code" field for that purpose, and the client already has a StatusError type... Please squash before we commit, though! |
@lavalamp - agree, an error associated with a "rest storage" interface should logically match REST error conditions as much as possible. |
does not exist. In the original implementation, GET, DELETE and PUT operations on non-existent resources used to return 500 but not 404.
Squashed. |
Make RESTful operations return 404 Not Found when the target resource does not exist.
Thanks for the change! |
Specify that stats writing continued in error.
Remove kustomize
Makefile: Disable static builds of flanneld
…rry-pick-481-to-release-4.6 Bug 1907461: kubelet: do not rerun init containers if any main containers have status
In the original implementation, GET, DELETE and PUT operations on
non-existent resources used to return 500 but not 404.