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

Unclear error messages #22

Open
jimmypoulsen opened this issue Oct 22, 2024 · 0 comments
Open

Unclear error messages #22

jimmypoulsen opened this issue Oct 22, 2024 · 0 comments

Comments

@jimmypoulsen
Copy link
Member

When getting an error from the API (eg a "400 Bad Request") we assign three things in the error instance:

  • message
  • status
  • data

message is set to response.message (response is a Net::HTTPResponse object) and consists of the actual HTTP error (eg "Bad Request"). IMO this is where things get a bit unclear. We already have the status (eg 400) so I don't believe the "Bad Request" is necessary. We should simply assign the API response to the message so we can use the great error messages the API generates.

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