Skip to content

Commit

Permalink
refactor: error logging in authentication system (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
chimpdev authored Oct 24, 2024
1 parent f5cf0b8 commit c929feb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/routes/auth/callback.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ module.exports = {

return response.redirect(redirectCookie || config.frontendUrl);
} catch (error) {
logger.error(`There was an error while getting access token: ${error}`);
logger.error('There was an error while getting access token:', error);

return response.sendError('Failed to get access token.', 500);
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/utils/middlewares/checkAuthentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = async function checkAuthentication(request, response, next) {

if (error instanceof AuthError) return response.sendError(error.message, 401);

logger.error(`There was an error while checking authentication: ${error}`);
logger.error('There was an error while checking authentication:', error);

return response.sendError('An error occurred while checking authentication.', 500);
}
Expand Down

0 comments on commit c929feb

Please sign in to comment.