Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

adds error handling to main provider #78

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

JakeLo123
Copy link
Collaborator

@JakeLo123 JakeLo123 commented Feb 9, 2024

What is this PR and why do we need it?

Adds error handling to the /me request so we don't set the user object to the wrong type of object
The issue is fully described by #77. This branch should fix the behavior described by the steps to reproduce from the linked issue (#77)

Changes

  • Check status of /me response and changes paths if failure.
  • Updates to mock responses in tests. Had to update fetch mocks in tests. It's okay for now, but using Mock Service Worker might be a nice future enhancement.
  • Fixes an issue where onRedirectFailure was getting invoked on refresh, not redirect and adds test coverage for that.

Pre-Merge Checklist (if applicable)

  • Unit and Feature tests have been added/updated for logic changes, or there is a justifiable reason for not doing so.

@JakeLo123 JakeLo123 added the bug Something isn't working label Feb 9, 2024
@JakeLo123 JakeLo123 self-assigned this Feb 9, 2024
@JakeLo123 JakeLo123 linked an issue Feb 9, 2024 that may be closed by this pull request
BriDavidson
BriDavidson previously approved these changes Feb 12, 2024
…ject to the wrong type of object

* Fixes an issue where onRedirectFailure was getting invoked on refresh, not redirect and adds test coverage for that.
@JakeLo123 JakeLo123 force-pushed the 77-provider-needs-error-handling branch from 52f61cd to 7a85876 Compare February 12, 2024 23:38
@JakeLo123 JakeLo123 merged commit 31af1f3 into main Feb 13, 2024
2 checks passed
@JakeLo123 JakeLo123 deleted the 77-provider-needs-error-handling branch February 13, 2024 16:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provider needs error handling
4 participants