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

Added error handling to useUser [SDK-2236] #229

Merged
merged 5 commits into from
Jan 7, 2021

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Jan 6, 2021

Description

This PR adds an error property to the return object of the useUser hook, that will contain an Error instance when the fetch() or response.json() calls throw.
The tests, documentation and example apps were updated accordingly.

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@Widcket Widcket added the review:medium Medium review label Jan 6, 2021
@Widcket Widcket requested a review from a team as a code owner January 6, 2021 17:55
@vercel
Copy link

vercel bot commented Jan 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/auth0/nextjs-auth0/o1521e0ej
✅ Preview: Canceled

[Deployment for 6ceda64 canceled]

@Widcket Widcket changed the title Add error handling to useUser [SDK-2236] Added error handling to useUser [SDK-2236] Jan 6, 2021
tests/fixtures/frontend.tsx Outdated Show resolved Hide resolved
src/frontend/with-page-auth-required.tsx Outdated Show resolved Hide resolved
@adamjmcgrath adamjmcgrath merged commit d1d9bf3 into beta Jan 7, 2021
@adamjmcgrath adamjmcgrath deleted the feature/use-user-error-handling branch January 7, 2021 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:medium Medium review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants