@supabase/storage-js 2.112.0-beta.0 → 2.112.0-canary.1

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
@@ -102,14 +102,15 @@ function isStorageError(error) {
102
102
  * Includes HTTP status code and service-specific error code
103
103
  */
104
104
  var StorageApiError = class extends StorageError {
105
- constructor(message, status, statusCode, namespace = "storage") {
105
+ constructor(message, status, statusCode, namespace = "storage", code) {
106
106
  super(message, namespace, status, statusCode);
107
107
  this.name = namespace === "vectors" ? "StorageVectorsApiError" : "StorageApiError";
108
108
  this.status = status;
109
109
  this.statusCode = statusCode;
110
+ this.code = code;
110
111
  }
111
112
  toJSON() {
112
- return _objectSpread2({}, super.toJSON());
113
+ return _objectSpread2(_objectSpread2({}, super.toJSON()), {}, { code: this.code });
113
114
  }
114
115
  };
115
116
  /**
@@ -323,7 +324,7 @@ const handleError = async (error, reject, options, namespace) => {
323
324
  if (!Number.isFinite(status)) status = 500;
324
325
  responseError.json().then((err) => {
325
326
  const statusCode = (err === null || err === void 0 ? void 0 : err.statusCode) || (err === null || err === void 0 ? void 0 : err.code) || status + "";
326
- reject(new StorageApiError(_getErrorMessage(err), status, statusCode, namespace));
327
+ reject(new StorageApiError(_getErrorMessage(err), status, statusCode, namespace, err === null || err === void 0 ? void 0 : err.code));
327
328
  }).catch(() => {
328
329
  const statusCode = status + "";
329
330
  reject(new StorageApiError(responseError.statusText || `HTTP ${status} error`, status, statusCode, namespace));
@@ -1609,7 +1610,7 @@ var StorageFileApi = class extends BaseApiClient {
1609
1610
 
1610
1611
  //#endregion
1611
1612
  //#region src/lib/version.ts
1612
- const version = "2.112.0-beta.0";
1613
+ const version = "2.112.0-canary.1";
1613
1614
 
1614
1615
  //#endregion
1615
1616
  //#region src/lib/constants.ts