Skip to content

Commit

Permalink
fix: improve sendMessage error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Juiced66 committed Sep 24, 2024
1 parent 92bb591 commit 7dcdc57
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/messenger-clients/SMTPClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@ export class SMTPClient extends MessengerClient<SMTPAccount> {
try {
await this.sendMessage(account, email);
} catch (error) {
if (error.response) {
throw new ExternalServiceError(
"SMTP " + JSON.stringify(error.response.body)
);
}

throw new ExternalServiceError(error);
throw new ExternalServiceError(`SMTP: ${JSON.stringify(error)}`);
}
}

Expand Down

0 comments on commit 7dcdc57

Please sign in to comment.