Skip to content

Commit

Permalink
chore: reduce logging noise (#3845)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmoussa-gc authored Jun 18, 2024
1 parent 9710406 commit f61ce45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/auth/nextAuth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ export const {
debug: process.env.NODE_ENV !== "production",
logger: {
error(error) {
if (error instanceof CredentialsSignin) {
logMessage.warn(`NextAuth - CredentialsSignin exception: ${JSON.stringify(error)}.`);
} else {
if (!(error instanceof CredentialsSignin)) {
// Not a CredentialsSignin error which is for invalid 2FA credentials
logMessage.error(`NextAuth error: ${JSON.stringify(error)}.`);
}
},
Expand Down

0 comments on commit f61ce45

Please sign in to comment.