-
Notifications
You must be signed in to change notification settings - Fork 20
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
Wrong http status assigned to status.FailedPrecondition #146
Comments
Interesting, original source of mapping is https://github.com/googleapis/googleapis/blob/f36c65081b19e0758ef5696feca27c7dcee5475e/google/rpc/code.proto#L127, I wonder was it a mistake in google repo or deliberate decision. |
Seems that Consider replacing 400->412 in swaggest for |
After this mod, when 304 is added to possible error responses with...
...openapi.json contains non-empty body for 304 but should not. |
Describe the bug
status.InvalidArgument
andstatus.FailedPrecondition
are different statuses but are mapped to the samehttp.StatusBadRequest
:https://github.com/swaggest/rest/blob/master/error.go#L130
https://github.com/swaggest/usecase/blob/master/status/status.go#L97
Expected behavior
status.FailedPrecondition
should be mapped tohttp.StatusPreconditionFailed
.Additional context
Related: #145
The text was updated successfully, but these errors were encountered: