ArcadiaPower / arc-quickstart

A sample app and accompanying walkthrough for the Arc APIs
7 stars 5 forks source link

Fix bug in error handling of Connect flow #45

Closed Simberific closed 2 years ago

Simberific commented 2 years ago

Previously, if the user hit an error while submitting credentials in the Connect flow, this error was being improperly handled, resulting in a React error if the user closed the Connect modal. This PR fixes this by correctly interpreting the error message in this case, and also provides a button to reopen the Connect modal so the user can try again.

I also added clearing the error state upon a successful Connect flow. Previously, the last error hit at any point during the flow would persist and show up when the user closed the modal.

Testing plan: fair amount of manual testing

Note: Styling improved in this PR