@zapier/zapier-sdk 0.91.0 → 0.91.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/CHANGELOG.md +12 -0
- package/dist/{chunk-SZBWDVX3.mjs → chunk-22USOWAR.mjs} +11 -5
- package/dist/{chunk-RO34ZWKR.cjs → chunk-6HEA7RSA.cjs} +11 -5
- package/dist/experimental.cjs +373 -373
- package/dist/experimental.mjs +2 -2
- package/dist/index.cjs +272 -272
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.91.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4886b5b: `runAction` failures now carry the action's structured errors on the thrown
|
|
8
|
+
`ZapierActionError`. `error.errors` (and its `actionErrors` alias) previously
|
|
9
|
+
stayed `undefined` for a failed action run, because the API reports that failure
|
|
10
|
+
in the body of a `200` response rather than as an HTTP error. Each entry now
|
|
11
|
+
exposes the machine-readable `code` — for example `authentication_error` when a
|
|
12
|
+
connection has expired — so callers can branch on the failure instead of
|
|
13
|
+
matching against the message text.
|
|
14
|
+
|
|
3
15
|
## 0.91.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -5997,7 +5997,7 @@ function parseDeprecationDate(value) {
|
|
|
5997
5997
|
}
|
|
5998
5998
|
|
|
5999
5999
|
// src/sdk-version.ts
|
|
6000
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.91.
|
|
6000
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.91.1" : void 0) || "unknown";
|
|
6001
6001
|
|
|
6002
6002
|
// src/utils/open-url.ts
|
|
6003
6003
|
var nodePrefix = "node:";
|
|
@@ -10228,12 +10228,18 @@ var runActionPlugin = defineMethod({
|
|
|
10228
10228
|
timeoutMilliseconds
|
|
10229
10229
|
});
|
|
10230
10230
|
if (result.errors && result.errors.length > 0) {
|
|
10231
|
-
const errorMessage2 = result.errors.map(
|
|
10232
|
-
(error) => error.detail || error.title || "Unknown error"
|
|
10233
|
-
).join("; ");
|
|
10231
|
+
const errorMessage2 = result.errors.map((error) => error.detail || error.title || "Unknown error").join("; ");
|
|
10234
10232
|
throw new ZapierActionError(`Action execution failed: ${errorMessage2}`, {
|
|
10235
10233
|
appKey,
|
|
10236
|
-
actionKey
|
|
10234
|
+
actionKey,
|
|
10235
|
+
errors: result.errors.map(
|
|
10236
|
+
(error) => ({
|
|
10237
|
+
status: 200,
|
|
10238
|
+
code: error.code ?? "unknown",
|
|
10239
|
+
title: error.title ?? "",
|
|
10240
|
+
detail: error.detail ?? ""
|
|
10241
|
+
})
|
|
10242
|
+
)
|
|
10237
10243
|
});
|
|
10238
10244
|
}
|
|
10239
10245
|
return {
|
|
@@ -5999,7 +5999,7 @@ function parseDeprecationDate(value) {
|
|
|
5999
5999
|
}
|
|
6000
6000
|
|
|
6001
6001
|
// src/sdk-version.ts
|
|
6002
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.91.
|
|
6002
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.91.1" : void 0) || "unknown";
|
|
6003
6003
|
|
|
6004
6004
|
// src/utils/open-url.ts
|
|
6005
6005
|
var nodePrefix = "node:";
|
|
@@ -10230,12 +10230,18 @@ var runActionPlugin = defineMethod({
|
|
|
10230
10230
|
timeoutMilliseconds
|
|
10231
10231
|
});
|
|
10232
10232
|
if (result.errors && result.errors.length > 0) {
|
|
10233
|
-
const errorMessage2 = result.errors.map(
|
|
10234
|
-
(error) => error.detail || error.title || "Unknown error"
|
|
10235
|
-
).join("; ");
|
|
10233
|
+
const errorMessage2 = result.errors.map((error) => error.detail || error.title || "Unknown error").join("; ");
|
|
10236
10234
|
throw new ZapierActionError(`Action execution failed: ${errorMessage2}`, {
|
|
10237
10235
|
appKey,
|
|
10238
|
-
actionKey
|
|
10236
|
+
actionKey,
|
|
10237
|
+
errors: result.errors.map(
|
|
10238
|
+
(error) => ({
|
|
10239
|
+
status: 200,
|
|
10240
|
+
code: error.code ?? "unknown",
|
|
10241
|
+
title: error.title ?? "",
|
|
10242
|
+
detail: error.detail ?? ""
|
|
10243
|
+
})
|
|
10244
|
+
)
|
|
10239
10245
|
});
|
|
10240
10246
|
}
|
|
10241
10247
|
return {
|