@supabase/postgrest-js 3.0.0-next.16 → 3.0.0-next.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/PostgrestBuilder.ts +2 -2
- package/src/PostgrestError.ts +6 -0
- package/src/version.ts +1 -1
package/package.json
CHANGED
package/src/PostgrestBuilder.ts
CHANGED
|
@@ -446,7 +446,7 @@ export default abstract class PostgrestBuilder<
|
|
|
446
446
|
*/
|
|
447
447
|
private async processResponse(res: Response): Promise<{
|
|
448
448
|
success: boolean
|
|
449
|
-
error:
|
|
449
|
+
error: PostgrestError | null
|
|
450
450
|
data: any
|
|
451
451
|
count: number | null
|
|
452
452
|
status: number
|
|
@@ -533,7 +533,7 @@ export default abstract class PostgrestBuilder<
|
|
|
533
533
|
|
|
534
534
|
return {
|
|
535
535
|
success: error === null,
|
|
536
|
-
error,
|
|
536
|
+
error: error ? new PostgrestError(error) : null,
|
|
537
537
|
data,
|
|
538
538
|
count,
|
|
539
539
|
status,
|
package/src/PostgrestError.ts
CHANGED
|
@@ -23,6 +23,12 @@ export default class PostgrestError extends Error {
|
|
|
23
23
|
*/
|
|
24
24
|
constructor(context: { message: string; details: string; hint: string; code: string }) {
|
|
25
25
|
super(context.message)
|
|
26
|
+
Object.defineProperty(this, 'message', {
|
|
27
|
+
value: context.message,
|
|
28
|
+
enumerable: true,
|
|
29
|
+
writable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
})
|
|
26
32
|
this.name = 'PostgrestError'
|
|
27
33
|
this.details = context.details
|
|
28
34
|
this.hint = context.hint
|
package/src/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '3.0.0-next.
|
|
7
|
+
export const version = '3.0.0-next.17'
|