Skip to content

Raw SQL Error Exposed on Duplicate Phone Number During User Creation #242

Closed
@mirolimsgd

Description

@mirolimsgd

Description:

If a user tries to register with a phone number that already exists in the database, the system returns a raw SQL error message to the application (ERROR: duplicate key value violates unique constraint "users_phone_key" (SQLSTATE 23505)).

Expected Behavior:

Instead of exposing database-level errors, the application should catch this specific constraint violation and return a user-friendly message like "This phone number is already registered. Please use a different number or try logging in."

Benefit:

Enhances usability by providing clear, understandable error messages instead of technical jargon. Improves security by not exposing internal database details.

Metadata

Metadata

Assignees

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