question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve error message when unable to fetch context

See original GitHub issue

When 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:open
  • Created 5 years ago
  • Reactions:16
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
mimozellcommented, Jan 18, 2021

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.

1reaction
ValiDraganescucommented, Apr 21, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found