Improve error message when unable to fetch context
See original GitHub issueWhen the context providers make AWS service calls to determine information (such as the list of availability zones), the user credentials are currently blindly assumed to have permissions to make the required calls, and the error message is opaque (You are not authorized to perform this operation
) and does not give any indication of what permission is missing.
Example:
Some context information is missing. Fetching...
Reading AZs for REDACTED:us-east-1
Using default AWS SDK credentials for account REDACTED:us
You are not authorized to perform this operation.
UnauthorizedOperation: You are not authorized to perform this operation.
at Request.extractError (/usr/local/share/.config/yarn/global/node_modules/aws-sdk/lib/services/ec2.js:50:35)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:16
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Improve error message when unable to fetch context #1898
When the context providers make AWS service calls to determine information (such as the list of availability zones), the user credentials ...
Read more >Handling Failed HTTP Responses With fetch() - TJ VanToll
Per MDN, the fetch() API only rejects a promise when a “network error is encountered, although this usually means permissions issues or ...
Read more >Getting "TypeError: Failed to fetch" when the request hasn't ...
The issue is when I send a get request, I'm receiving a valid response from the server but also the fetch API is...
Read more >Error handling - Apollo GraphQL Docs
Built-in error codes ; GRAPHQL_VALIDATION_FAILED. The GraphQL operation is not valid against the server's schema. ; BAD_USER_INPUT. The GraphQL operation includes ...
Read more >How to Use the Fetch API (Correctly) - CODE Magazine
The Promise object returned by fetch() doesn't reject an error when an HTTP error status is returned (400 or greater) like most normal...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Using --verbose with cdk synth helped me find the issue. In my case it was:
Call failed: describeAvailabilityZones(undefined) => You are not authorized to perform this operation.
Godlike!