Skip to content

Commit

Permalink
fix: Use clearer error message for credential resolution (#732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmarzex authored Sep 27, 2023
1 parent bbd95e7 commit 1a17de3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/monitoring/monitoring-integration-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ const MonitoringIntegrationService = (serverless) => {
try {
return (await stsClient.send(new GetCallerIdentityCommand({}))).Account;
} catch (error) {
throw new Error(
'Serverless Framework Observability set-up was unable to determine the Account ID for this AWS account. This likely due to insufficient permissions in the current AWS credentials.'
const err = new Error(
'AWS provider credentials not found. Learn how to set up AWS provider credentials in our docs here: http://slss.io/aws-creds-setup.'
);
err.stack = undefined;
throw err;
}
};

Expand Down

0 comments on commit 1a17de3

Please sign in to comment.