Skip to content
This repository has been archived by the owner on Oct 27, 2023. It is now read-only.

Commit

Permalink
fix(logging): whitespace fix for log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansonshine committed Oct 25, 2020
1 parent 919557e commit cd6b7c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const isExpired = (expiresAt: string): boolean => {
const now = Date.now();
const exp = new Date(expiresAt.replace('UTC', ''));
const expired = now > exp.getTime();
logger.debug(`Credential is ${expired ? '' : 'NOT'} expired`);
logger.debug(`Credential is ${expired ? '' : 'NOT '}expired`);
return expired;
};

Expand All @@ -79,7 +79,7 @@ export const isCredential = (
(config as CachedCredential)?.accessToken &&
(config as CachedCredential).expiresAt
);
logger.debug(`Configuration is ${isCred ? '' : 'NOT'} a credential config`);
logger.debug(`Configuration is ${isCred ? '' : 'NOT '}a credential config`);
return isCred;
};

Expand All @@ -98,12 +98,12 @@ export const awsSsoLogin = async (profileName: string): Promise<void> => {

export const isExpiredCredsError = (e: unknown): e is ExpiredCredsError => {
const isExpErr = e instanceof ExpiredCredsError;
logger.debug(`Error is ${isExpErr ? '' : 'NOT'} an ExpiredCredsError`);
logger.debug(`Error is ${isExpErr ? '' : 'NOT '}an ExpiredCredsError`);
return isExpErr;
};

export const isSdkError = (e: unknown): e is AwsSdkError => {
const isSdkErr = e instanceof AwsSdkError;
logger.debug(`Error is ${isSdkErr ? '' : 'NOT'} an AwsSdkError`);
logger.debug(`Error is ${isSdkErr ? '' : 'NOT '}an AwsSdkError`);
return isSdkErr;
};

0 comments on commit cd6b7c5

Please sign in to comment.