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(datastore): List errors that are returned from AppSync #2801

Merged
merged 2 commits into from
May 3, 2024

Conversation

mattcreaser
Copy link
Member

  • PR title and description conform to Pull Request guidelines.

Issue #, if available:

Description of changes:
Improve logging of errors returned from AppSync. We previously erroneously reported a response with errors as an "empty response" which limits ability to diagnose the error. We will now include the actual error in the log message.

Before:

IrRecoverableException{message=Empty response from AppSync., cause=null, recoverySuggestion=Report to AWS team.}

After:

IrRecoverableException{message=Received errors from AppSync: GraphQLResponse.Error{message='Not Authorized to access syncGuests on type Query', locations='[GraphQLLocation{line='2', column='3'}]', path='[GraphQLPathSegment{value='syncGuests'}]', extensions='{errorInfo=null, data=null, errorType=Unauthorized}'}, cause=null, recoverySuggestion=Report to AWS team.}

How did you test these changes?
(Please add a line here how the changes were tested)

Documentation update required?

  • No
  • Yes (Please include a PR link for the documentation update)

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mattcreaser mattcreaser requested a review from a team as a code owner May 3, 2024 16:57
@tylerjroach tylerjroach enabled auto-merge (squash) May 3, 2024 17:43
@tylerjroach tylerjroach merged commit 8927058 into main May 3, 2024
3 checks passed
@tylerjroach tylerjroach deleted the mattcreaser/api-empty-response branch May 3, 2024 18:14
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.

3 participants