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

Use ExtensionError for errors thrown from the API #48

Open
brennie opened this issue Sep 26, 2024 · 0 comments
Open

Use ExtensionError for errors thrown from the API #48

brennie opened this issue Sep 26, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@brennie
Copy link
Collaborator

brennie commented Sep 26, 2024

But by default, an Error thrown from inside an API implementation function is not exposed to the extension code that called the function – it is converted into generic errors with the message “An unexpected error occurred”. To throw a specific error to extensions, use the ExtensionError class:

fx source docs

@brennie brennie added this to the v0.2.0 milestone Sep 26, 2024
@brennie brennie added the bug Something isn't working label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant