Skip to content

Commit 8a7a72f

Browse files
committed
fix: log message when SSO token has expired
1 parent 0a5f4d3 commit 8a7a72f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

alchemy-effect-aws/src/credentials.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
type AwsCredentialIdentity,
1616
type AwsCredentialIdentityProvider,
1717
} from "@smithy/types";
18+
import * as Console from "effect/Console";
1819
import * as Context from "effect/Context";
1920
import * as Data from "effect/Data";
2021
import * as Effect from "effect/Effect";
@@ -298,6 +299,9 @@ export const fromSSO = () =>
298299
);
299300

300301
if (isExpired(ssoToken.expiresAt)) {
302+
yield* Console.log(
303+
`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,
304+
);
301305
yield* Effect.fail(
302306
new ExpiredSSOToken({
303307
message: `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,

0 commit comments

Comments
 (0)