@supabase/postgrest-js 2.105.4 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/postgrest-js",
3
- "version": "2.105.4",
3
+ "version": "2.105.5-beta.0",
4
4
  "description": "Isomorphic PostgREST client",
5
5
  "keywords": [
6
6
  "postgrest",
@@ -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: any
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,
@@ -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.4'
7
+ export const version = '2.105.5-beta.0'