Skip to content

Commit

Permalink
refactor: reword error log for when a GC Notify request times out (#792)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigzour authored Aug 29, 2024
1 parent 78d2bc9 commit 132e992
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lambda-code/cognito-email-sender/lib/gc-notify-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions lambda-code/nagware/lib/gc-notify-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions lambda-code/reliability/lib/gc-notify-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
);
}
}
Expand Down

0 comments on commit 132e992

Please sign in to comment.