Skip to content

Conversation

@jameswhite-cmd
Copy link

This pull request implements error handling for user signup to ensure that a duplicate email or username results in an HTTP 409 Conflict response with a consistent error format.

Changes Made:

  • Updated backend routes to return a structured JSON error response when a user attempts to sign up with an email or username that is already in use.
  • Added a ConflictError model to standardize the error response format.
  • Added tests for the create user and register user functionalities to verify the updated error handling on the backend.
  • Updated frontend signup handling to map the API 409 error to inline form errors, ensuring users receive immediate feedback on conflicting credentials.
  • Added Playwright tests to ensure the signup flow correctly displays the error for existing users.

This enhancement improves user experience by providing clear and structured error messages, aligning with OpenAPI documentation standards.


This pull request was co-created with Cosine Genie

Original Task: full-stack-demo/s5wvyi75vu87
Author: James White

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant