Is the `DatabaseError` class from `@
Is the
DatabaseError
class from @neondatabase/serverless
the same as PostgresError
from the postgres
package? Reason I'm asking is because I'm implementing errorhandling, and I want to type narrow the error type that is thrown when violating something like unique constraints forexample3 Replies
deep-jade•15mo ago
My CF worker is not happy about using the PostgresError class
Essentially, can I do something like the following, where I have a recursive function to make sure that we are generating and inserting the verification code even if we have a unique violation
ambitious-aqua•15mo ago
Not sure. Reading the source code would be your best bet. It is open source on GitHub
deep-jade•15mo ago
I tested it out in the meantime, seems to be the same thing, I'm getting the expected errors