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

[IE-673] Update api errors handling #21

Merged
merged 5 commits into from
Jun 6, 2024

Conversation

wilkinsondesouza
Copy link

@wilkinsondesouza wilkinsondesouza commented Jun 6, 2024

Description

When one of our customers was running a scenario that relied on creating a survey some events were not being processed and were raising an undefined method merge' for nil:NilClass`.

This happened because the Qualtrics API is returning something other than the successful response the library relies on, and this response code was not listed under the RequestErrorHandler, which should handle everything that is not a success.

To make sure we will have all the information needed when any error messages are returned, we are adding all missing response errors to the handler.

Qualtrics Error Responses
** You have to click on the third json tab to see an example of an error response.

image

Resolves

IE-673

@b6b b6b requested a review from marioconcilio June 6, 2024 18:27
Copy link

@b6b b6b left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@@ -10,15 +12,39 @@ def on_complete(env)
private

def raise_http_errors(code, body)
return unless HTTP_RESPONSE_ERROR_RANGE.include?(code)
Copy link

Choose a reason for hiding this comment

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

Love the clean guard here.

Copy link

@marioconcilio marioconcilio left a comment

Choose a reason for hiding this comment

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

LGTM

@wilkinsondesouza wilkinsondesouza merged commit accc6ae into master Jun 6, 2024
1 check passed
@wilkinsondesouza wilkinsondesouza deleted the ws-nate/update-api-errors-handling branch June 6, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants