Handle JSONified errors while registering #2155

Closed
raven wants to merge 2 commits from gitlab-mr-iid-888 into develop
Member

Closes #617

I'm pretty sure this is not a good solution, but I did check all the errors I could find while looking through TwitterAPI.register_user and I don't think I saw any cases where this would fail.

Closes #617 I'm pretty sure this is not a good solution, but I did check all the errors I could find while looking through `TwitterAPI.register_user` and I don't think I saw any cases where this would fail.
Owner

should probably parse errors at lower level tho

should probably parse errors at lower level tho
Author
Member

I can't think of any place to do it besides the backend, and I don't think I see a good way to do it there. But yeah, this is a hack.

I can't think of any place to do it besides the backend, and I don't think I see a good way to do it there. But yeah, this is a hack.
Owner

I mean you're handling it in modules/users, while it could be handled in api.service

I mean you're handling it in modules/users, while it could be handled in api.service
Author
Member

I decided to separate out the logic of building the error message from both api.service and users and also make a couple of other small stylistic fixes.

I tested this with CAPTCHA errors, an invalid invite token, and an error from Ecto (using an already taken nickname).

I decided to separate out the logic of building the error message from both api.service and users and also make a couple of other small stylistic fixes. I tested this with CAPTCHA errors, an invalid invite token, and an error from Ecto (using an already taken nickname).
Owner

looks ok to me

looks ok to me
Owner

looks good too, gotta test it a bit

looks good too, gotta test it a bit

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma-fe!2155
No description provided.