@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/dist/index.mjs CHANGED
@@ -49,6 +49,12 @@ var PostgrestError = class extends Error {
49
49
  */
50
50
  constructor(context) {
51
51
  super(context.message);
52
+ Object.defineProperty(this, "message", {
53
+ value: context.message,
54
+ enumerable: true,
55
+ writable: true,
56
+ configurable: true
57
+ });
52
58
  this.name = "PostgrestError";
53
59
  this.details = context.details;
54
60
  this.hint = context.hint;
@@ -387,7 +393,7 @@ var PostgrestBuilder = class {
387
393
  }
388
394
  return {
389
395
  success: error === null,
390
- error,
396
+ error: error ? new PostgrestError(error) : null,
391
397
  data,
392
398
  count,
393
399
  status,