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

Returning error code FailedPrecondition is code 400 instead of 412 #4071

Closed
rdimitrov opened this issue Aug 2, 2024 · 1 comment
Closed
Assignees

Comments

@rdimitrov
Copy link
Member

No description provided.

@rdimitrov rdimitrov self-assigned this Aug 5, 2024
@rdimitrov
Copy link
Member Author

Closing this issue as this seems to be the correct behaviour as per the gRPC specification.

Minder uses the following library call to translate the gRPC code to HTTP -
https://github.com/grpc-ecosystem/grpc-gateway/blob/main/runtime/errors.go#L36

We can see that FailedPrecondition is explicitly translated to BadRequest. The reasoning behind this is described in grpc-ecosystem/grpc-gateway#972.

cc: @kantord @peppescg

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

No branches or pull requests

1 participant