-
Notifications
You must be signed in to change notification settings - Fork 130
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
Handle response objects of instance String for API errors #509
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, worth adding a test case for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Kiran! Could you add a test, ideally for a legitimate error that we're experiencing.
@AaronDDM @nickbair-nylas I think there are some tests regarding this in http_client.spec file? Would you be able to sanity check if that is doing the same? |
Added a test for this change. One of the github action is failing. I am not sure if it's related to this: |
Description
Due to unexpected errors such as Bad Gateway, the response object is of Instance string, while trying to fetch the provider_error we return a Ruby error of
undefined method
fetch' for "Bad Gateway":String`This PR addresses the type before parsing the provider_error property
License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.