Open kdabir opened 1 year ago
if this is a dumb question, please forgive my ignorance here :)
When using react hook useRunDbQuery, how to return SQL errors? let's say, UNIQUE constraints failure, like following
useRunDbQuery
Error while executing query: INSERT INTO "products"(id, title, type) VALUES (?, ?, ?) - UNIQUE constraint failed: products.title
I see the error in console but not able to return it. I was expecting some pattern like following but don't see any clear guidance in docs.
{loading, error, data} = useRunDbQuery(...)
@kdabir hmm, you are right. Will fix it
if this is a dumb question, please forgive my ignorance here :)
When using react hook
useRunDbQuery
, how to return SQL errors? let's say, UNIQUE constraints failure, like followingI see the error in console but not able to return it. I was expecting some pattern like following but don't see any clear guidance in docs.