aws / aws/aws-appsync-community
[Feature Request] Ability to hide JS errors from code.js in response
- Dominant language
- HTML
- Stars
- 507
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
We are currently in the process of building an API using AppSync and have hit a bit of an issue.
Our information security policies dictate that we should not expose specific technical details in responses to users. Currently if a JavaScript error occurs in a pipeline resolver function, the error will bubble to the client in the response with some technical information.
For example, if we attempt to access a property on a null object, an error something like this will be returned:
```json
{
"data": null,
"errors": [
{
"path": [
"places"
],
"data": null,
"errorType": "Code",
"errorInfo": null,
"places": [
{
"line": 2,
"column": 5,
"sourceName": null
}
],
"message": "code.js:162:13: ReferenceError: [invalid property] is not defined"
}
]
}
```
There does not seem to be a way to intercept these types of messages. AppSync will return early and bypass the remaining pipeline functions.
Could there be an option to hide details of JS runtime errors in responses?
In the meantime, does anyone know how I can work around this issue?
Thank you
Contributor guide
Research direction
The issue names AWS AppSync pipeline resolver functions and JavaScript runtime errors, but provides no repository files, tests, or entry point to inspect. Start by clarifying whether the requested behavior belongs in AppSync configuration or resolver execution, and define which error details must be hidden and how clients should receive the replacement response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, graphql, javascript
- Domain
- api, backend, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100