develop-me / bagajob

Job Hunting Management App built by Develop Me students for Develop Me students.
https://bagajob.developme.space
GNU Affero General Public License v3.0
1 stars 2 forks source link

Account Registration - error handling #43

Closed kierancott closed 4 years ago

kierancott commented 4 years ago

Error: App crashes (code 422) with no error handling

Issue: registering an account with an email that was already in the database returns the below error - no error handling exists for this behaviour

93353133-923bad00-f809-11ea-9c35-a6a888e1ac4a

Action: provide the user with an error message

kierancott commented 4 years ago

Updated

Commit https://github.com/develop-me/bagajob/pull/42/commits/71f2d3db06470aa0dec8e0587e336abee79b7e55

Action:

Result:

Instead of the app crashing due to unprocessable entity, the below error is shown:

Screenshot 2020-09-19 at 15 28 08
nosvalds commented 4 years ago

Hey Kieran,

I'm still seeing this testing on my side. I do see the error message briefly on the screen, but then it bombs out again with the unhandled promise rejection:

image
kierancott commented 4 years ago

I've checked again, and I'm struggling to reproduce that behaviour.

It's handling the rejection and rendering the error below the form.

Screenshot 2020-09-21 at 16 55 17
kierancott commented 4 years ago

Update:

Fixed by commit https://github.com/develop-me/bagajob/pull/42/commits/b68f7d7c0eec210c3aa2d5f9e91c14a6db8006e8 (thanks, Nik!)

nosvalds commented 4 years ago

Resolved!

image