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

fix handling of async query errors #47

Merged
merged 2 commits into from
Feb 5, 2024
Merged

Conversation

chrispatrick
Copy link
Collaborator

No description provided.

Comment on lines +92 to +98
if len(queryResponse.Errors) > 0 {
errorMessage := queryResponse.Errors[0].Message
if errorMessage == "An unexpected error has occurred" {
return nil, fmt.Errorf("async query contained error: %s", errorMessage).(types.RetryableExecutionError)
}
return nil, fmt.Errorf("async query contained error: %s", errorMessage)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm good with this being here, but you should also then remove the error handling in gql_async.go

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good shout.

@chrispatrick chrispatrick merged commit 57cf86a into main Feb 5, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants