From bb496c85401e1723a2d525ffab213058f206da97 Mon Sep 17 00:00:00 2001 From: ali ebrahimi Date: Tue, 11 Jun 2024 23:47:09 +0330 Subject: [PATCH] Add some logs and change some logs messages --- src/controllers/v1/passportAuthenticationController.ts | 1 + src/routes/v1/adminbroRouter.ts | 2 +- src/services/safeServices.ts | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controllers/v1/passportAuthenticationController.ts b/src/controllers/v1/passportAuthenticationController.ts index be88209..401adc7 100644 --- a/src/controllers/v1/passportAuthenticationController.ts +++ b/src/controllers/v1/passportAuthenticationController.ts @@ -27,6 +27,7 @@ export class PassportAuthenticationController { try { address = ethers.utils.verifyMessage(message, signature); } catch (e) { + logger.error('authenticate, passport invalid signature error', e); throw new StandardError(errorMessagesEnum.PASSPORT_INVALID_SIGNATURE); } logger.info('Logging address: ', address); diff --git a/src/routes/v1/adminbroRouter.ts b/src/routes/v1/adminbroRouter.ts index 3b01ea8..71bae4d 100644 --- a/src/routes/v1/adminbroRouter.ts +++ b/src/routes/v1/adminbroRouter.ts @@ -46,7 +46,7 @@ export const getAdminBroRouter = async () => { } return false; } catch (e) { - logger.error({ e }); + logger.error('getAdminBroInstance() error', e); return false; } }, diff --git a/src/services/safeServices.ts b/src/services/safeServices.ts index 8678bb3..3664e25 100644 --- a/src/services/safeServices.ts +++ b/src/services/safeServices.ts @@ -19,7 +19,7 @@ export const fetchSafeMessage = async ( ); safeMessage = response.data; } catch (e) { - console.error(e); + console.error('fetchSafeMessage() error', e); } return safeMessage; @@ -43,7 +43,7 @@ export const fetchSafeMessageByTimestamp = async ( response.data.results, ); } catch (e) { - console.error(e); + console.error('fetchSafeMessageByTimestamp() error', e); } return safeMessage;