Skip to content

Commit

Permalink
log unexpected auth failures
Browse files Browse the repository at this point in the history
  • Loading branch information
kajoseph committed Dec 9, 2024
1 parent 8bfa595 commit ab659bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/bitcore-node/src/utils/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ const authenticateMiddleware: RequestHandler = async (req: Request, res: Respons
return res.status(401).send('Authentication failed');
}
return next();
} catch (e) {
} catch (e: any) {
logger.error('Unexpected error authenticating request: %o', e?.stack || e?.message || e);
return res.status(401).send('Authentication failed');
}
};
Expand Down

0 comments on commit ab659bb

Please sign in to comment.