diff --git a/backend/qn-history-service/src/middlewares/basicAccessControl.ts b/backend/qn-history-service/src/middlewares/basicAccessControl.ts index 1053b25a53..04aaea9930 100644 --- a/backend/qn-history-service/src/middlewares/basicAccessControl.ts +++ b/backend/qn-history-service/src/middlewares/basicAccessControl.ts @@ -12,6 +12,6 @@ export const verifyToken = ( .then(() => next()) .catch((err) => { console.log(err.response); - return res.status(err.response.status).json(err.response.data); + return res.status(err.response?.status).json(err.response?.data); }); };