Describe the bug
EmailService.sendEmail catches transport/SMTP errors internally and never rethrows or returns a rejected promise. Because of this, any caller wrapping the call in .catch() ,for example UserService in user.service.ts, never receives the failure. The .catch() blocks are effectively dead code, and email send failures are silently suppressed instead of being surfaced.
To Reproduce
Steps to reproduce the behavior:
- Trigger a flow that sends an email through UserService (e.g. registration, password reset, notification).
- Force an SMTP/transport failure (bad credentials, unreachable host, timeout, etc.).
- Observe that the .catch() around the sendEmail call in UserService never fires, despite the email failing to send.
Expected behavior
EmailService.sendEmail should propagate transport errors , either by rethrowing the caught error or returning a promise that rejects with it ,so calling modules can properly catch and handle email failures (logging, retries, user-facing error messages, etc.).
Additional context
I'd like to work on this issue myself if it's approved, happy to submit a PR with the fix (rethrowing/propagating the error in EmailService.sendEmail and verifying UserService's catch blocks handle it correctly).
Describe the bug
EmailService.sendEmail catches transport/SMTP errors internally and never rethrows or returns a rejected promise. Because of this, any caller wrapping the call in .catch() ,for example UserService in user.service.ts, never receives the failure. The .catch() blocks are effectively dead code, and email send failures are silently suppressed instead of being surfaced.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
EmailService.sendEmail should propagate transport errors , either by rethrowing the caught error or returning a promise that rejects with it ,so calling modules can properly catch and handle email failures (logging, retries, user-facing error messages, etc.).
Additional context
I'd like to work on this issue myself if it's approved, happy to submit a PR with the fix (rethrowing/propagating the error in EmailService.sendEmail and verifying UserService's catch blocks handle it correctly).