From 01fdbaa990a26950a9d61f8d234c9679496bbe46 Mon Sep 17 00:00:00 2001 From: Hariom Balhara Date: Tue, 26 Apr 2022 17:01:57 +0530 Subject: [PATCH] Improve logs for 500 error in datadog for /book/event (#2593) --- packages/app-store/wipemycalother/lib/eventManager.ts | 8 ++++++-- packages/core/EventManager.ts | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/app-store/wipemycalother/lib/eventManager.ts b/packages/app-store/wipemycalother/lib/eventManager.ts index 224a02d190..e971249c4e 100644 --- a/packages/app-store/wipemycalother/lib/eventManager.ts +++ b/packages/app-store/wipemycalother/lib/eventManager.ts @@ -323,7 +323,9 @@ export default class EventManager { if (credential) { return createMeeting(credential, event); } else { - return Promise.reject("No suitable credentials given for the requested integration name."); + return Promise.reject( + `No suitable credentials given for the requested integration name:${event.location}` + ); } } @@ -364,7 +366,9 @@ export default class EventManager { const bookingRef = booking ? booking.references.filter((ref) => ref.type === credential.type)[0] : null; return updateMeeting(credential, event, bookingRef); } else { - return Promise.reject("No suitable credentials given for the requested integration name."); + return Promise.reject( + `No suitable credentials given for the requested integration name:${event.location}` + ); } } diff --git a/packages/core/EventManager.ts b/packages/core/EventManager.ts index 899edb1c5c..c8e30a692b 100644 --- a/packages/core/EventManager.ts +++ b/packages/core/EventManager.ts @@ -323,7 +323,9 @@ export default class EventManager { if (credential) { return createMeeting(credential, event); } else { - return Promise.reject("No suitable credentials given for the requested integration name."); + return Promise.reject( + `No suitable credentials given for the requested integration name:${event.location}` + ); } } @@ -364,7 +366,9 @@ export default class EventManager { const bookingRef = booking ? booking.references.filter((ref) => ref.type === credential.type)[0] : null; return updateMeeting(credential, event, bookingRef); } else { - return Promise.reject("No suitable credentials given for the requested integration name."); + return Promise.reject( + `No suitable credentials given for the requested integration name:${event.location}` + ); } }