Skip to content

Commit e0d66b0

Browse files
test authutil error
Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 2c01b0d commit e0d66b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/core/src/test/setupUtil.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ export function registerAuthHook(secret: string, lambdaId = process.env['AUTH_UT
226226
const url = new URL(target.toString(true))
227227
const userCode = url.searchParams.get('user_code')
228228

229+
console.log(`User Code ,${userCode}, is typeof, ${typeof userCode}`)
230+
if (typeof userCode !== 'string') {
231+
throw new ToolkitError(`User Code ,${userCode}, is typeof, ${typeof userCode}`)
232+
}
233+
229234
// TODO: Update this to just be the full URL if the authorizer lambda ever
230235
// supports the verification URI with user code embedded (VerificationUriComplete).
231236
const verificationUri = url.origin

0 commit comments

Comments
 (0)