Skip to content

resendVerificationOtp wraps all errors in InternalServerErrorException, hiding meaningful 4xx errors #203

Description

@Nabeelahh

Area: Backend

  • Description: The top-level catch in resendVerificationOtp re-throws every exception (including BadRequestException and NotFoundException) as a 500 InternalServerErrorException. The original status code and message are lost, making it impossible for clients to distinguish a missing email from a server crash.
  • File(s): backend/src/auth/auth.service.ts
  • Priority: Medium
  • Implementation & verification: Trace all controller, service, provider, and module-registration callers before changing the implementation so the DTO and HTTP-error contract remains stable. Add focused automated coverage for the reported failure mode and the expected successful path, mocking external services where applicable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions