@supabase/postgrest-js 2.105.4-canary.2 → 2.105.5-beta.0
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.d.mts.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
|
@@ -451,7 +451,7 @@ export default abstract class PostgrestBuilder<
|
|
|
451
451
|
*/
|
|
452
452
|
private async processResponse(res: Response): Promise<{
|
|
453
453
|
success: boolean
|
|
454
|
-
error:
|
|
454
|
+
error: PostgrestError | null
|
|
455
455
|
data: any
|
|
456
456
|
count: number | null
|
|
457
457
|
status: number
|
|
@@ -538,7 +538,7 @@ export default abstract class PostgrestBuilder<
|
|
|
538
538
|
|
|
539
539
|
return {
|
|
540
540
|
success: error === null,
|
|
541
|
-
error,
|
|
541
|
+
error: error ? new PostgrestError(error) : null,
|
|
542
542
|
data,
|
|
543
543
|
count,
|
|
544
544
|
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 = '2.105.
|
|
7
|
+
export const version = '2.105.5-beta.0'
|