aws / aws/aws-appsync-community
Lambda error not resulting in errors object in AppSync response
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
I used to get the **errors** object in AppSync response and a 5xx status code - if there was an error thrown from Lambda resolver (either a timeout error or a handled error I send as the first parameter in the lambda callback)
Eg.
`callback(errorMessage, …)`
I can no longer see the errors object in AppSync – even though the Lambda resolver is throwing errors.
Is this a change in implementation or a bug?
I'm having to work around this by changing the response mapping template in AppSync resolver – to use **$util.error** based on a flag in the Lambda response.
While doing this – I'm able to get the errors object in AppSync response – but it’s still a 200 OK response.
Any way we can override this status code in AppSync?
Contributor guide
Research direction
Start by reviewing the reported AppSync Lambda resolver behavior, including timeout errors and callback(errorMessage, …). Compare the response mapping template workaround using $util.error with the observed errors object and HTTP status. Done means establishing whether this is an implementation change or bug and whether AppSync supports overriding the 200 status code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100