Skip to content

Commit

Permalink
Pedro feedback - set original exception as inner exception of mail se…
Browse files Browse the repository at this point in the history
…nder exception
  • Loading branch information
dcsl-alexis committed Dec 12, 2024
1 parent 2a737fb commit 9f9664b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions OneBeyond.Studio.EmailProviders.AwsSes/EmailSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,27 +71,27 @@ public EmailSender(
}
catch (AccountSuspendedException ex)
{
throw new EmailSenderException("The account's ability to send email has been permanently restricted.");
throw new EmailSenderException("The account's ability to send email has been permanently restricted.", ex);
}
catch (MailFromDomainNotVerifiedException ex)
{
throw new EmailSenderException("The sending domain is not verified.");
throw new EmailSenderException("The sending domain is not verified.", ex);
}
catch (MessageRejectedException ex)
{
throw new EmailSenderException("The message content is invalid.");
throw new EmailSenderException("The message content is invalid.", ex);
}
catch (SendingPausedException ex)
{
throw new EmailSenderException("The account's ability to send email is currently paused.");
throw new EmailSenderException("The account's ability to send email is currently paused.", ex);
}
catch (TooManyRequestsException ex)
{
throw new EmailSenderException("Too many requests were made. Please try again later.");
throw new EmailSenderException("Too many requests were made. Please try again later.", ex);
}
catch (Exception ex)
{
throw new EmailSenderException($"An error occurred while sending the email");
throw new EmailSenderException($"An error occurred while sending the email", ex);
}
}
}

0 comments on commit 9f9664b

Please sign in to comment.