Issue Description
Currently in the signup flow at /new-signup, we take firstname and lastname inputs.
After submitting, we hit /username to generate a username. If this fails or errors, the frontend sends a request to update the profile with {"username": "undefined"}.
The backend endpoint PATCH /users/self accepts this body and updates the database with the string "undefined".
The proposed change will:
- Prevent the backend from accepting "undefined" as a username
- Return an error if this invalid data is sent
Expected Behaviour
- The backend should not update the database if username is "undefined"
- The API should return an error for this request
Current Behaviour
- The backend accepts "undefined" string
- The database is updated with "undefined" as the username
Reproducibility
Severity/Priority
Additional Information
- This happens during the onboarding flow.
- Endpoint:
PATCH /users/self
- Requirement: Instead of a simple check for
undefined, fix the root cause.
Screenshot
Checklist
Issue Description
Currently in the signup flow at
/new-signup, we take firstname and lastname inputs.After submitting, we hit
/usernameto generate a username. If this fails or errors, the frontend sends a request to update the profile with{"username": "undefined"}.The backend endpoint
PATCH /users/selfaccepts this body and updates the database with the string "undefined".The proposed change will:
Expected Behaviour
Current Behaviour
Reproducibility
Severity/Priority
Additional Information
PATCH /users/selfundefined, fix the root cause.Screenshot
Checklist