Skip to content

Commit

Permalink
Merge pull request #2346 from guardian/vb/fix-dev-awscreds-error
Browse files Browse the repository at this point in the history
  • Loading branch information
coldlink authored Oct 23, 2023
2 parents bb69fe7 + db89f3d commit 098b554
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/server/lib/serverSideLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ class KinesisTransport extends Transport {
})
.catch((error: unknown) => {
if (error instanceof Error) {
if (error.name === 'ExpiredTokenException' && stage === 'DEV') {
if (
error.name === 'CredentialsProviderError' &&
stage === 'DEV'
) {
console.log(error.message);
console.warn(
'AWS Credentials Expired. Have you added `Identity` Janus credentials?',
Expand Down
2 changes: 1 addition & 1 deletion src/server/lib/trackMetric.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const trackMetric = (
)
.catch((error: unknown) => {
if (error instanceof Error) {
if (error.name === 'ExpiredTokenException' && Stage === 'DEV') {
if (error.name === 'CredentialsProviderError' && Stage === 'DEV') {
logger.warn(error.message);
logger.warn(
'AWS Credentials Expired. Have you added `Identity` Janus credentials?',
Expand Down

0 comments on commit 098b554

Please sign in to comment.