From 132e9924f462bebec3e64272666c84179fb40dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20JANIN?= Date: Thu, 29 Aug 2024 11:49:41 -0400 Subject: [PATCH] refactor: reword error log for when a GC Notify request times out (#792) --- lambda-code/cognito-email-sender/lib/gc-notify-client.ts | 4 ++-- lambda-code/nagware/lib/gc-notify-client.ts | 4 ++-- lambda-code/reliability/lib/gc-notify-client.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lambda-code/cognito-email-sender/lib/gc-notify-client.ts b/lambda-code/cognito-email-sender/lib/gc-notify-client.ts index ed14c30bb..3dccc4c8b 100644 --- a/lambda-code/cognito-email-sender/lib/gc-notify-client.ts +++ b/lambda-code/cognito-email-sender/lib/gc-notify-client.ts @@ -51,14 +51,14 @@ export class GCNotifyClient { * is an instance of XMLHttpRequest in the browser and an instance * of http.ClientRequest in Node.js */ - errorMessage = `Error sending to Notify with request :${error.request}.`; + errorMessage = `Request timed out.`; } } else if (error instanceof Error) { errorMessage = `${(error as Error).message}.`; } throw new Error( - `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}.` + `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}` ); } } diff --git a/lambda-code/nagware/lib/gc-notify-client.ts b/lambda-code/nagware/lib/gc-notify-client.ts index ed14c30bb..3dccc4c8b 100644 --- a/lambda-code/nagware/lib/gc-notify-client.ts +++ b/lambda-code/nagware/lib/gc-notify-client.ts @@ -51,14 +51,14 @@ export class GCNotifyClient { * is an instance of XMLHttpRequest in the browser and an instance * of http.ClientRequest in Node.js */ - errorMessage = `Error sending to Notify with request :${error.request}.`; + errorMessage = `Request timed out.`; } } else if (error instanceof Error) { errorMessage = `${(error as Error).message}.`; } throw new Error( - `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}.` + `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}` ); } } diff --git a/lambda-code/reliability/lib/gc-notify-client.ts b/lambda-code/reliability/lib/gc-notify-client.ts index ed14c30bb..3dccc4c8b 100644 --- a/lambda-code/reliability/lib/gc-notify-client.ts +++ b/lambda-code/reliability/lib/gc-notify-client.ts @@ -51,14 +51,14 @@ export class GCNotifyClient { * is an instance of XMLHttpRequest in the browser and an instance * of http.ClientRequest in Node.js */ - errorMessage = `Error sending to Notify with request :${error.request}.`; + errorMessage = `Request timed out.`; } } else if (error instanceof Error) { errorMessage = `${(error as Error).message}.`; } throw new Error( - `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}.` + `Failed to send submission through GC Notify to ${emailAddress}. Reason: ${errorMessage}` ); } }