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

Do not parse/yield Clever API response if error occurs #24475

Merged
merged 1 commit into from Aug 27, 2018

Conversation

maddiedierker
Copy link
Contributor

@maddiedierker maddiedierker commented Aug 24, 2018

pair @ewjordan.

Related to this Honeybadger error.

Rails' render method does not return from the method it is called from (related double-rendering error from Rails docs), when an error would occur in the GET request to Clever, the error would be rendered, but we were still trying to parse and yield the failed response, which is nil in the case of an error.

This makes sure that we only parse/yield the response upon a successful response from the Clever API.

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Good find you two!

@maddiedierker maddiedierker merged commit f963267 into staging Aug 27, 2018
@maddiedierker maddiedierker deleted the clever-import-bug branch August 27, 2018 16:31
@joshlory
Copy link
Contributor

Nice! Thanks for fixing my old bug 😄 (introduced in commit 7ce5e09).

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

Successfully merging this pull request may close these issues.

None yet

3 participants