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

Editing the name from the settings does not update in the database. #604

Closed
omarNaifer12 opened this issue Jan 6, 2025 · 7 comments · Fixed by #605
Closed

Editing the name from the settings does not update in the database. #604

omarNaifer12 opened this issue Jan 6, 2025 · 7 comments · Fixed by #605
Assignees
Labels
difficulty: 2 good first issue Good for newcomers priority: medium scope: platform Everything related to the keyshade platform package type: bug Something isn't working

Comments

@omarNaifer12
Copy link
Contributor

Keyshade-Personal-MicrosoftEdge2025-01-0601-51-05-ezgif com-video-to-gif-converter

@omarNaifer12
Copy link
Contributor Author

Hi, if no one is working on this issue, I can start with it.

@omarNaifer12
Copy link
Contributor Author

/attempt

Copy link

github-actions bot commented Jan 6, 2025

Assigned the issue to @omarNaifer12!

@rajdip-b rajdip-b added type: bug Something isn't working good first issue Good for newcomers scope: platform Everything related to the keyshade platform package priority: medium difficulty: 2 labels Jan 6, 2025
@rajdip-b
Copy link
Member

rajdip-b commented Jan 6, 2025

Thanks! @omarNaifer12

@rajdip-b
Copy link
Member

rajdip-b commented Jan 7, 2025

I saw your PR, and it felt a bit off to me. You see, the API has been tested in and out, but the platform might have errors. I just noticed in the issue video that you got an error when you tried to update your profile. Can you zoom in on that error a bit?
image

@omarNaifer12
Copy link
Contributor Author

The error occurs because the backend sends a conflict response, as shown in the shared image. The error message indicates that the email already exists. This happens because the updateSelf function in the backend throws a ConflictException if userExists is true:
throw new ConflictException('User with this email already exists');

I believe this issue arises because the same email as the user's current email is being sent. To fix this, I added an extra condition to prevent this scenario, and it worked for me.

If you encounter any errors with my changes, please share the error message and status code so we can determine if it’s a different issue that I haven’t faced.
keyshade-error-conflict-front

@rajdip-b
Copy link
Member

rajdip-b commented Jan 7, 2025

This is more of a frontend issue. The frontend shouldn't be sending the email in the body if a new email isn't specified. So perhaps you can fix the malformed request body. That will fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 2 good first issue Good for newcomers priority: medium scope: platform Everything related to the keyshade platform package type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants