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