diff --git a/src/routes/v1/notificationRouter.ts b/src/routes/v1/notificationRouter.ts index d34263e..440799a 100644 --- a/src/routes/v1/notificationRouter.ts +++ b/src/routes/v1/notificationRouter.ts @@ -5,6 +5,7 @@ import { } from '../../middlewares/authentication'; import { NotificationsController } from '../../controllers/v1/notificationsController'; import { sendStandardResponse } from '../../utils/responseUtils'; +import { logger } from '../../utils/logger'; import { createNewUserAddressIfNotExists } from '../../repositories/userAddressRepository'; export const notificationRouter = express.Router(); @@ -22,6 +23,7 @@ notificationRouter.post( }); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/thirdParty/notifications error', e); next(e); } }, @@ -41,6 +43,7 @@ notificationRouter.post( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/thirdParty/notificationsBulk error', e); next(e); } }, @@ -65,6 +68,7 @@ notificationRouter.get( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/notifications error', e); next(e); } }, @@ -85,6 +89,7 @@ notificationRouter.put( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/notifications/read/:notificationId error', e); next(e); } }, @@ -100,6 +105,7 @@ notificationRouter.get( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/notifications/countUnread/:walletAddress error', e); next(e); } }, @@ -120,6 +126,7 @@ notificationRouter.put( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/notifications/readAll error', e); next(e); } }, diff --git a/src/routes/v1/notificationSettingsRouter.ts b/src/routes/v1/notificationSettingsRouter.ts index 38924a9..d950253 100644 --- a/src/routes/v1/notificationSettingsRouter.ts +++ b/src/routes/v1/notificationSettingsRouter.ts @@ -2,6 +2,7 @@ import express, { Request, Response } from 'express'; import { validateAuthMicroserviceJwt } from '../../middlewares/authentication'; import { NotificationSettingsController } from '../../controllers/v1/notificationSettingsController'; import { sendStandardResponse } from '../../utils/responseUtils'; +import { logger } from '../../utils/logger'; export const notificationSettingsRouter = express.Router(); @@ -25,6 +26,7 @@ notificationSettingsRouter.get( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('get /notification_settings error', e); next(e); } }, @@ -47,6 +49,7 @@ notificationSettingsRouter.put( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('/notification_settings/:id error', e); next(e); } }, @@ -68,6 +71,7 @@ notificationSettingsRouter.put( ); return sendStandardResponse({ res, result }); } catch (e) { + logger.error('put /notification_settings error', e); next(e); } },