Inability to capture errors that come from underlying auth0 spa js package
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- react, typescript
- Domain
- authentication, frontend
Research direction
Start by tracing how auth errors from the underlying auth0-spa-js package reach the React SDK, then check the SDK API documentation and existing error handling. The issue asks for a callback to handle those errors; done means the callback can receive them and callers can handle them, with tests covering the behavior. The payload does not identify a source file or test.
Written by the indexing model from the issue text.
Description
Checklist
- The issue can be reproduced in the auth0-react sample app (or N/A).
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
I get this error often, the failed to fetch error. I understand that that cannot be solved, however I would like to handle it better then it just being thrown. Ideally for underlying errors there is a callback that we can attach to and handle the error ourselves.
if there is a solution here I am missing feel free to point it out
Error
Failed to fetch
mechanism
generic
handled
true
node_modules/@auth0/auth0-react/node_modules/@auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js:1:22246
in
o.port1.onmessage
{snip} geChannel;i.port1.onmessage=function(e){e.data.error?o(new Error(e.data.error)):n(e.data),i.port1.close()},t.postMessage(e,[i.port2])}),We=( {snip}
//# sourceMappingURL=auth0-spa-js.production.esm.js.map
Reproduction
this is intermittent and hard to reproduce
Additional context
No response
auth0-react version
2.30.0
React version
19.3.1
Which browsers have you tested in?
Chrome
- Dominant language
- TypeScript
- Stars
- 992
- Forks
- 292
- Avg merge
- 10h 29m
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from auth0/auth0-react
-
Users getting logged out with "Unsuccessful Refresh Token exchange, reused refresh token detected"Openbug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
auth0/auth0-react#929 · 19 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 35/100
auth0/auth0-react#562 · 14 comments ·
Maintainers usually reply within 1 day
All issues in auth0/auth0-react
Similar issues
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Openarea: @angular/build
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
angular/angular-cli#34764 ·
Maintainers usually reply within 1 day
-
status/need-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
google-gemini/gemini-cli#30384 · 1 comment ·
Maintainers usually reply within 1 day
-
P2
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug ready-for-human
Difficulty 2/5 1-3 hours Newbie friendliness 60/100
LucasSantana-Dev/Lucky#3150 ·
Maintainers usually reply within 1 day
-
enhancement good first issue priority: low size: XS
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day