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

SaveUserSettings returns "user_already_exists" if you follow docs typings #4076

Closed
nick-delirium opened this issue Jun 20, 2023 · 4 comments · Fixed by #4077
Closed

SaveUserSettings returns "user_already_exists" if you follow docs typings #4076

nick-delirium opened this issue Jun 20, 2023 · 4 comments · Fixed by #4077

Comments

@nick-delirium
Copy link

Method docs shows that almost everything is optional, yet in reality if you don't include the entire object, it will return an error.

Payload:

{ "auth": <jwt token>, "show_nsfw": false }

result: user_already_exists

Payload 2:
{ "show_nsfw": true, "theme": "browser", "default_sort_type": 1, "default_listing_type": 1, "interface_language": "browser", "discussion_languages": [], "avatar": <url>, "banner": null, "display_name": "name", "show_avatars": true, "bot_account": false, "show_bot_accounts": true, "show_scores": true, "show_read_posts": true, "show_new_post_notifs": false, "email": "email", "bio": "**this is** a test", "send_notifications_to_email": false, "matrix_user_id": null, "auth": "<JWT>" }

result:
all good

@nick-delirium
Copy link
Author

(btw, why its mixing actual feed/lemmy/client settings with profile information)

@aeharding
Copy link

Related: #3565

@dessalines
Copy link
Member

Stale issue, feel free to reopen if its still a problem.

@dessalines dessalines closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
@TheBrokenRail
Copy link

This issue is absolutely still a problem. On https://voyager.lemmy.ml, sending a SaveUserSettings with only one property set will give a {"error":"user_already_exists"} response.

@dessalines dessalines reopened this Oct 21, 2023
@dessalines dessalines transferred this issue from LemmyNet/lemmy-js-client Oct 21, 2023
dessalines added a commit that referenced this issue Oct 21, 2023
…User update is null.

- Fixes #4076
- Also upgrading api_test deps
Nutomic pushed a commit that referenced this issue Oct 24, 2023
#4077)

* Fixing problem with SaveUserSettings, when either the Person or LocalUser update is null.

- Fixes #4076
- Also upgrading api_test deps

* Move function into test.
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 a pull request may close this issue.

4 participants