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

Map rails HTTP status codes to twirp::errors. #36

Open
skatkov opened this issue Oct 10, 2023 · 0 comments
Open

Map rails HTTP status codes to twirp::errors. #36

skatkov opened this issue Oct 10, 2023 · 0 comments

Comments

@skatkov
Copy link
Contributor

skatkov commented Oct 10, 2023

twirp gem offers a proper mapping of errors to HTTP status codes.

Instead of using "Twirp::Error.new" in our codebase, we should be using proper status codes and this gem should automatically map them to twirp errors.

https://github.com/arthurnn/twirp-ruby/blob/caf2381a94721d830c47e38ea244fa1c7a8dc006/lib/twirp/error.rb#L53-L61

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