Skip to content

Ghazi - fix: change error code from 501 to 400 in userProfileController#1272

Merged
one-community merged 1 commit into
developmentfrom
ghazi-fix-create-new-user
Aug 2, 2025
Merged

Ghazi - fix: change error code from 501 to 400 in userProfileController#1272
one-community merged 1 commit into
developmentfrom
ghazi-fix-create-new-user

Conversation

@Ghazi1212
Copy link
Copy Markdown
Contributor

@Ghazi1212 Ghazi1212 commented Mar 15, 2025

Description

Changed the error type from 501 POST to 400 Bad Request and fixed an issue preventing user creation and account addition in "User Management" in the frontend PR.

Related PRS (if any):

To test this backend PR you need to checkout the frontend PR.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. follow instructions on frontend PR

Note:

Create a new user with any role. The request would return a 400 Bad request if the default password in not handled properly, which is fixed in the Frintend.

Copy link
Copy Markdown

@rnavyaprabha rnavyaprabha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks fine to me and i also checked PR 3279 related to this one ,it works as expected so i am approving this PR associated to that.
Here is the screenshot
1
2

@sampantangi sampantangi self-requested a review March 17, 2025 01:08
Copy link
Copy Markdown

@sampantangi sampantangi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did tested the changes as instructed. Below are the screenshots for the output creating user profile controller and another screenshot is the error popup in inspect, if that was the only expected output then can approve it.

image

image

Copy link
Copy Markdown
Contributor

@Amalesh-A Amalesh-A left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out your branch and followed your instructions. I observed that everything works as expected.
Before
Before -D

After creating an user:
After
After - D

@Ghazi1212 Ghazi1212 changed the title fix: change error code from 501 to 400 in userProfileController Ghazi - fix: change error code from 501 to 400 in userProfileController Mar 28, 2025
Copy link
Copy Markdown

@sankargalla sankargalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have verified the fronted for this backend change. The user creation flow works fine as expected.

PR 3279+1272(2)

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 3755a28 into development Aug 2, 2025
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.

6 participants