@proveanything/smartlinks 1.14.13 → 1.14.14

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/api/asset.js CHANGED
@@ -10,6 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { request, post, put, del, getApiHeaders, getBaseURL, isProxyEnabled, proxyUploadFormData } from "../http";
13
+ import { SmartlinksApiError } from "../types/error";
13
14
  export var asset;
14
15
  (function (asset) {
15
16
  function resolveApiUrl(path) {
@@ -175,7 +176,8 @@ export var asset;
175
176
  }
176
177
  catch (e) {
177
178
  const msg = (e === null || e === void 0 ? void 0 : e.message) || 'URL upload failed';
178
- throw new AssetUploadError(msg, 'UNKNOWN');
179
+ const details = e instanceof SmartlinksApiError ? e.errorResponse : undefined;
180
+ throw new AssetUploadError(msg, 'UNKNOWN', details);
179
181
  }
180
182
  }
181
183
  asset.uploadFromUrl = uploadFromUrl;
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.14.13 | Generated: 2026-05-19T11:49:34.090Z
3
+ Version: 1.14.14 | Generated: 2026-05-29T11:57:02.879Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/dist/http.js CHANGED
@@ -757,7 +757,7 @@ function ensureProxyListener() {
757
757
  const errorBody = (_d = (_c = msg.errorBody) !== null && _c !== void 0 ? _c : errObj) !== null && _d !== void 0 ? _d : msg.error;
758
758
  if (statusCode) {
759
759
  const errBody = normalizeErrorResponse(errorBody, statusCode);
760
- pending.reject(new SmartlinksApiError(message, statusCode, errBody));
760
+ pending.reject(new SmartlinksApiError(errBody.message, statusCode, errBody));
761
761
  }
762
762
  else {
763
763
  pending.reject(new Error(message));
@@ -431,7 +431,7 @@ export class IframeResponder {
431
431
  const fetchResponse = await fetch(fullUrl, fetchOptions);
432
432
  const responseData = await fetchResponse.json().catch(() => null);
433
433
  if (!fetchResponse.ok) {
434
- response.error = (responseData === null || responseData === void 0 ? void 0 : responseData.message) || `Request failed with status ${fetchResponse.status}`;
434
+ response.error = (responseData === null || responseData === void 0 ? void 0 : responseData.message) || (responseData === null || responseData === void 0 ? void 0 : responseData.errorText) || `Request failed with status ${fetchResponse.status}`;
435
435
  response.statusCode = fetchResponse.status;
436
436
  response.errorBody = responseData;
437
437
  }
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.14.13 | Generated: 2026-05-19T11:49:34.090Z
3
+ Version: 1.14.14 | Generated: 2026-05-29T11:57:02.879Z
4
4
 
5
5
  This is a concise summary of all available API functions and types.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.14.13",
3
+ "version": "1.14.14",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",