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 ErrorContext to give more context which action caused the actual error. #1530

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

blaubaer
Copy link

Checklist

  • This PR makes changes to the public API
  • I have included links for closing relevant issue numbers

Details

This added AuthState.errorContext: ErrorContext which holds information what was causing the issue. Most likely which method and (if available) the provided args.

@pamapa
Copy link
Member

pamapa commented Mar 12, 2025

Looks great. I see that you added an additional property to avoid breaking the API. Extending the existing error property would make it easier for usage. Either you have an error object or its null. If you have one you can find the message + details...

For me it would be ok in that situation to bump the major version and break the ABI...

@pamapa pamapa added the enhancement New feature or request label Mar 12, 2025
@pamapa
Copy link
Member

pamapa commented Mar 12, 2025

Ideally we also adapt error object within that new component: #1476

@blaubaer
Copy link
Author

Sound like a good idea. Also since now useAutoSignin() is merged to main, I'll try to scatch something. Give me a moment.

@blaubaer
Copy link
Author

I've just adjusted as discussed. I've tried to find a sweet spot between do not introduce a new property but also do not break the current API tooo much.

Therefore: Error is not longer an Error class, it is an interface which has several properties also an Error class usually has, but not all (except name).

What was in the initial contribution kind is now source as it makes now more sense, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants