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!
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
orerror.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!