Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x authored Sep 21, 2023
1 parent db3ede4 commit 86083cd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/seam/connect/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ const getAuthHeadersForApiKey = ({

if (isAccessToken(apiKey)) {
throw new InvalidSeamTokenError(
'An access token cannot be used as an apiKey without specifying a workspaceId',
'An access token cannot be used as an apiKey',
)
}

if (isJwt(apiKey) || !isSeamToken(apiKey)) {
throw new InvalidSeamTokenError(
`Unknown or Invalid apiKey format, expected token to start with ${tokenPrefix}`,
`Unknown or invalid apiKey format, expected token to start with ${tokenPrefix}`,
)
}

Expand All @@ -66,7 +66,7 @@ const getAuthHeadersForClientSessionToken = ({

export class InvalidSeamTokenError extends Error {
constructor(message: string) {
super(`SeamHttp received an authorization invalid token: ${message}`)
super(`SeamHttp received an invalid token: ${message}`)
this.name = this.constructor.name
Error.captureStackTrace(this, this.constructor)
}
Expand Down

0 comments on commit 86083cd

Please sign in to comment.