Skip to content

Commit

Permalink
chore: Add docLinks to customer auth errors
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Dec 10, 2024
1 parent d58b5fc commit 43060ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions control-plane/src/modules/auth/customer-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ export const verifyCustomerProvidedAuth = async ({
if (e instanceof JobPollTimeoutError) {
throw new AuthenticationError(
`Call to ${VERIFY_FUNCTION_ID} did not complete in time`,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
);
}

if (e instanceof InvalidJobArgumentsError) {
if (e instanceof Error) {
throw new AuthenticationError(
`Could not find ${VERIFY_FUNCTION_ID} registration`,
`Call to ${VERIFY_FUNCTION_ID} failed with error: ${e.message}`,
"https://docs.inferable.ai/pages/auth#handlecustomerauth"
);
}

throw e;
}
};

0 comments on commit 43060ae

Please sign in to comment.