Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset password with invalid mask email. Unclear error message and HTTP status code 401 #272

Open
TetianaPerinha opened this issue Apr 17, 2024 · 4 comments · Fixed by #242
Assignees
Labels
bug Something isn't working good first issue Good for newcomers medium priority Medium priority issue

Comments

@TetianaPerinha
Copy link
Collaborator

TetianaPerinha commented Apr 17, 2024

Description: According to the requirements when user sends a request to reset the password with an invalid format/mask email user should get a clear error message.

Step to reproduce:

Sent POST request as below:

curl --location 'http://0.0.0.0:8083/api/v1/auth/password/change'
--header 'Content-Type: application/json'
--data-raw '{
"email": "@‌gmail.com",
"code": "123-123-123",
"password": "password12345"
}'

Expected result: "Email must be valid" and HTTP CODE = 400 ‘Bad request’

Actual result: "message": "User with id = null is not found.", and HTTP Status CODE = 401Unauthorized

image

@TetianaPerinha TetianaPerinha added bug Something isn't working good first issue Good for newcomers low priority Low priority issue medium priority Medium priority issue and removed low priority Low priority issue labels Apr 17, 2024
@DarsiSreelekha
Copy link

hey @TetianaPerinha
I would like to pick this issue , would you please assign it to me

@TetianaPerinha
Copy link
Collaborator Author

hey @TetianaPerinha I would like to pick this issue , would you please assign it to me

Hey @DarsiSreelekha, I've assigned this task to you. If you have any questions, feel free to ask.

@DarsiSreelekha
Copy link

Hey @TetianaPerinha
The above change would also effect the http://0.0.0.0:8083/api/v1/auth/password/forgot as internally both are using the same method that throws the same error.
Since it is the same case I think it should be valid to have this change for this api as well.
Attached below is the updated API response for the above.

image

@TetianaPerinha
Copy link
Collaborator Author

Hey @TetianaPerinha The above change would also effect the http://0.0.0.0:8083/api/v1/auth/password/forgot as internally both are using the same method that throws the same error. Since it is the same case I think it should be valid to have this change for this api as well. Attached below is the updated API response for the above.

image

@Sunagatov Could you please review the details of this task?

This was linked to pull requests Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers medium priority Medium priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants