You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 9, 2025. It is now read-only.
feat: support setting throwOnError at the client level
Currently, throwOnError can be set to true for any given query (/rpc
call). This change allows the flag to be set to true at client
initialization time, ensuring that you do not need to rely on each
invocation either handling the error returned, or setting the flag
correctly.
Copy file name to clipboardExpand all lines: test/__snapshots__/index.test.ts.snap
+25Lines changed: 25 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2285,6 +2285,31 @@ Object {
2285
2285
}
2286
2286
`;
2287
2287
2288
+
exports[`throwOnError can be disabled per call 1`] = `
2289
+
Object {
2290
+
"code": "42P01",
2291
+
"details": null,
2292
+
"hint": null,
2293
+
"message": "relation \\"public.missing_table\\" does not exist",
2294
+
}
2295
+
`;
2296
+
2297
+
exports[`throwOnError setting at the client level - query 1`] = `
2298
+
Object {
2299
+
"code": "42P01",
2300
+
"details": null,
2301
+
"hint": null,
2302
+
"message": "relation \\"public.missing_table\\" does not exist",
2303
+
}
2304
+
`;
2305
+
2306
+
exports[`throwOnError setting at the client level - rpc 1`] = `
2307
+
Object {
2308
+
"hint": "If a new function was created in the database with this name and parameters, try reloading the schema cache.",
2309
+
"message": "Could not find the public.missing_fn() function or the public.missing_fn function with a single unnamed json or jsonb parameter in the schema cache",
2310
+
}
2311
+
`;
2312
+
2288
2313
exports[`throwOnError throws errors instead of returning them 1`] = `
0 commit comments