-
Notifications
You must be signed in to change notification settings - Fork 135
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
Ruby exceptions hide error messages #533
Comments
Reopening issue as we had to revert #548 |
Intercom's API may reply with a response that looks like this:
As noted above this will raise an With the patch from #548 applied the raised error will instead be:
This is caused by two separate issues not addressed in #548:
The workaround for a codebase I maintain was to refine the behaviors of |
This still seems to be happening. |
Version info
Expected behavior
Exception objects raised by the Intercom client should include the error message, as are surfaced by the API. For example, this is a possible API response body associated with a 403 Forbidden response code. The message is very important to understanding why the action is forbidden:
Actual behavior
The Ruby client masks all details of the error returned by the API, and surfaces only a blank Ruby object that can be used to guess the return code, but not the message:
Steps to reproduce
Additional details
It looks like the client was designed to parse these error messages properly in raise_application_errors_on_failure, but most non-20x response codes will abort client handling early in raise_errors_on_failure
The text was updated successfully, but these errors were encountered: