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

Feature Request: Better Error Handling Support #333

Open
robertlong opened this issue Sep 20, 2024 · 0 comments
Open

Feature Request: Better Error Handling Support #333

robertlong opened this issue Sep 20, 2024 · 0 comments

Comments

@robertlong
Copy link

I'd like it to be a bit easier to handle errors thrown by pglite. Currently the DatabaseError class isn't exported and is bundled into the final library. The constructor name is obfuscated as well. So I can't reliably check if a thrown error is a instanceof DatabaseError or error.constructor.name == "DatabaseError". I can check for the existence of certain fields on the error object, but I'd rather be able to use one of the previous methods.

I'd also really like the DatabaseError Typescript type to be exported by the library so that I can pull all of the properties off of the object in a typesafe way without using casting to my own user-land types.

Really enjoying Pglite though! Keep up the good work!

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

No branches or pull requests

1 participant