diff --git a/src/auth/action.ts b/src/auth/action.ts index 734da6e9..c16db0bd 100644 --- a/src/auth/action.ts +++ b/src/auth/action.ts @@ -9,7 +9,7 @@ export const signInAction = async ( try { await signIn('credentials', Object.fromEntries(formData)); } catch (error) { - if ((error as Error).message.includes(CREDENTIALS_SIGN_IN_ERROR)) { + if ((`${error}`).includes(CREDENTIALS_SIGN_IN_ERROR)) { return CREDENTIALS_SIGN_IN_ERROR; } throw error;