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