@pipelex/sdk 0.30.0 → 0.33.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/README.md +20 -4
- package/dist/artifacts.js +23 -9
- package/dist/artifacts.js.map +1 -1
- package/dist/client.d.ts +78 -12
- package/dist/client.js +234 -86
- package/dist/client.js.map +1 -1
- package/dist/codegen-check.d.ts +9 -0
- package/dist/codegen-check.js +12 -6
- package/dist/codegen-check.js.map +1 -1
- package/dist/error-models.d.ts +60 -2
- package/dist/error-models.js +169 -3
- package/dist/error-models.js.map +1 -1
- package/dist/error-verdicts.d.ts +34 -0
- package/dist/error-verdicts.js +69 -0
- package/dist/error-verdicts.js.map +1 -0
- package/dist/errors.d.ts +210 -46
- package/dist/errors.js +289 -62
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/prepare-inputs.js +26 -5
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/upload-grant.d.ts +15 -10
- package/dist/upload-grant.js +36 -17
- package/dist/upload-grant.js.map +1 -1
- package/dist/upload.js +17 -4
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +8 -7
- package/docs/artifact-download.md +3 -3
- package/docs/errors.md +93 -10
- package/docs/input-preparation.md +11 -7
- package/package.json +2 -2
package/dist/errors.js
CHANGED
|
@@ -1,25 +1,97 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Pipelex SDK errors — transport
|
|
3
|
-
* `PipelexApiClient
|
|
4
|
-
* (re-exported from `mthds/protocol`),
|
|
2
|
+
* Pipelex SDK errors — the argument, transport, run-lifecycle, input-preparation and artifact
|
|
3
|
+
* errors `PipelexApiClient` raises. Every one derives from `PipelexRequestError`, itself a
|
|
4
|
+
* `PipelineRequestError` (the protocol base, re-exported from `mthds/protocol`), and so carries
|
|
5
|
+
* a verdict: `retryable` and `errorDomain`, always decided. The one exported error outside the
|
|
6
|
+
* family, `CodegenLockError`, declares the same two members itself.
|
|
5
7
|
*/
|
|
6
8
|
import { PipelineRequestError } from "mthds/protocol";
|
|
9
|
+
import { fallbackVerdict } from "./error-verdicts.js";
|
|
7
10
|
export { PipelineRequestError };
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
const ERROR_DOMAINS = new Set(["input", "config", "runtime"]);
|
|
12
|
+
/** Whether a value is one of the three error domains. */
|
|
13
|
+
export function isErrorDomain(value) {
|
|
14
|
+
return typeof value === "string" && ERROR_DOMAINS.has(value);
|
|
15
|
+
}
|
|
16
|
+
/** Build a verdict; each class below declares its own with it. */
|
|
17
|
+
function makeVerdict(errorDomain, retryable) {
|
|
18
|
+
return Object.freeze({ errorDomain, retryable });
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The base of every error this SDK raises over a request, carrying the verdict as two readonly
|
|
22
|
+
* own properties: `retryable` and `errorDomain`. Each subclass passes its verdict to this
|
|
23
|
+
* constructor, so a class that forgets one does not compile, and every class says its verdict
|
|
24
|
+
* where it is defined.
|
|
25
|
+
*
|
|
26
|
+
* It refines the standard's `PipelineRequestError`, so `instanceof PipelineRequestError` still
|
|
27
|
+
* matches every SDK error. To read a verdict from anything a `catch` holds, use
|
|
28
|
+
* `errorVerdictOf`, which also reads it off an error raised by another copy of this SDK.
|
|
29
|
+
*/
|
|
30
|
+
export class PipelexRequestError extends PipelineRequestError {
|
|
31
|
+
/** Whether asking again can plausibly succeed. Always decided. */
|
|
32
|
+
retryable;
|
|
33
|
+
/** Who can fix the failure: `input`, `config` or `runtime`. Always decided. */
|
|
34
|
+
errorDomain;
|
|
35
|
+
constructor(message, verdict, options) {
|
|
36
|
+
super(message, options);
|
|
37
|
+
this.name = "PipelexRequestError";
|
|
38
|
+
this.retryable = verdict.retryable;
|
|
39
|
+
this.errorDomain = verdict.errorDomain;
|
|
12
40
|
}
|
|
13
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* The verdict of anything a `catch` holds: the pair from an `Error` carrying a boolean
|
|
44
|
+
* `retryable` and a known `errorDomain`, and `undefined` otherwise.
|
|
45
|
+
*
|
|
46
|
+
* The check is structural rather than `instanceof`, so it reads every error of this SDK, of
|
|
47
|
+
* another copy of it installed beside this one, of a consumer's own subclass, and an `mthds`
|
|
48
|
+
* `ApiResponseError` whose runner sent both members. `undefined` means the error carries no
|
|
49
|
+
* verdict: the `RangeError` or `TypeError` the SDK raises for an argument of the wrong type or
|
|
50
|
+
* range before any request is sent (a bug in the calling code), the caller's own abort, which the
|
|
51
|
+
* client rethrows untouched, or anything else a `try` block threw. An argument the client refuses
|
|
52
|
+
* for what it asks is a `RequestArgumentError`, which carries one.
|
|
53
|
+
*/
|
|
54
|
+
export function errorVerdictOf(err) {
|
|
55
|
+
if (!(err instanceof Error))
|
|
56
|
+
return undefined;
|
|
57
|
+
const { retryable, errorDomain } = err;
|
|
58
|
+
if (typeof retryable !== "boolean" || !isErrorDomain(errorDomain))
|
|
59
|
+
return undefined;
|
|
60
|
+
return { retryable, errorDomain };
|
|
61
|
+
}
|
|
62
|
+
// ── Argument refusals ────────────────────────────────────────────────
|
|
63
|
+
/**
|
|
64
|
+
* The SDK refused a call's arguments before sending any request: no run source given to
|
|
65
|
+
* `execute()` or `start()`, run sources or method selectors that exclude each other, a selector
|
|
66
|
+
* rule of `validate()`, an empty `validateFiles()`, a reserved key in `extra`, or a base URL that
|
|
67
|
+
* is not host-only. Nothing reached the API, so the message says what to change.
|
|
68
|
+
*
|
|
69
|
+
* Its verdict is `input`, not retryable — the caller must change the arguments — unless
|
|
70
|
+
* `options.verdict` declares another: the client declares `config` for a base URL that is not
|
|
71
|
+
* host-only, since it typically comes from `PIPELEX_BASE_URL`. A refusal the standard's own
|
|
72
|
+
* check raises (`assertExclusiveRunSources`) is rethrown as this class with the same message, the
|
|
73
|
+
* standard's error as `cause`.
|
|
74
|
+
*/
|
|
75
|
+
export class RequestArgumentError extends PipelexRequestError {
|
|
76
|
+
constructor(message, options) {
|
|
77
|
+
super(message, options?.verdict ?? makeVerdict("input", false), options);
|
|
78
|
+
this.name = "RequestArgumentError";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
// ── Input preparation ────────────────────────────────────────────────
|
|
14
82
|
/**
|
|
15
83
|
* Base class for every failure raised by input preparation (`uploadFile` /
|
|
16
84
|
* `prepareInputs`). Catch this to handle any preparation failure; catch a
|
|
17
85
|
* subclass to branch on the semantic category. All preparation failures are
|
|
18
86
|
* raised BEFORE any run is created — a run never triggers a hidden upload.
|
|
87
|
+
*
|
|
88
|
+
* Its verdict is `input`, not retryable — the asset, the inputs or the method selector must
|
|
89
|
+
* change — unless `options.verdict` declares another: the SDK's own subclasses do, and so can a
|
|
90
|
+
* consumer's, such as a form reporting a missing input in its own words.
|
|
19
91
|
*/
|
|
20
|
-
export class InputPreparationError extends
|
|
92
|
+
export class InputPreparationError extends PipelexRequestError {
|
|
21
93
|
constructor(message, options) {
|
|
22
|
-
super(message, options);
|
|
94
|
+
super(message, options?.verdict ?? makeVerdict("input", false), options);
|
|
23
95
|
this.name = "InputPreparationError";
|
|
24
96
|
}
|
|
25
97
|
}
|
|
@@ -58,7 +130,10 @@ export class InvalidLocalSourceError extends InputPreparationError {
|
|
|
58
130
|
}
|
|
59
131
|
/**
|
|
60
132
|
* The server or storage refused the asset — most commonly a `413` past the
|
|
61
|
-
* service-defined size cap, or storage refusing an upload with a grant.
|
|
133
|
+
* service-defined size cap, or storage refusing an upload with a grant. A storage
|
|
134
|
+
* `4xx` that says nothing about the file is not among them: a `408` or a `429`, which
|
|
135
|
+
* time out or throttle the request, a `400 RequestTimeout` and a `409
|
|
136
|
+
* ConditionalRequestConflict` are an `UploadTransportError`. The SDK
|
|
62
137
|
* does not impose a client-side cap; it surfaces the refusal. `filename` and
|
|
63
138
|
* `status` locate it, and `code` says why: the SDK sets it on every one it raises,
|
|
64
139
|
* so it is undefined only on one a caller constructs without it.
|
|
@@ -78,43 +153,90 @@ export class RejectedAssetError extends InputPreparationError {
|
|
|
78
153
|
/**
|
|
79
154
|
* The configured deployment does not support upload (no `/v1/upload` route, seen
|
|
80
155
|
* as a `404`). Upload is a hosted Pipelex-product capability even though the SDK
|
|
81
|
-
* can be pointed at other base URLs.
|
|
156
|
+
* can be pointed at other base URLs. Its verdict is `config`, not retryable: the base URL
|
|
157
|
+
* must point at a deployment that serves upload.
|
|
82
158
|
*/
|
|
83
159
|
export class UnsupportedUploadCapabilityError extends InputPreparationError {
|
|
84
160
|
constructor(message, options) {
|
|
85
|
-
super(message, options);
|
|
161
|
+
super(message, { ...options, verdict: makeVerdict("config", false) });
|
|
86
162
|
this.name = "UnsupportedUploadCapabilityError";
|
|
87
163
|
}
|
|
88
164
|
}
|
|
89
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Upload was not authorized — a `401`/`403` from the upload route. Its verdict is `config`, not
|
|
167
|
+
* retryable: the credential must change.
|
|
168
|
+
*/
|
|
90
169
|
export class UploadAuthenticationError extends InputPreparationError {
|
|
91
170
|
status;
|
|
92
171
|
constructor(message, status, options) {
|
|
93
|
-
super(message, options);
|
|
172
|
+
super(message, { ...options, verdict: makeVerdict("config", false) });
|
|
94
173
|
this.name = "UploadAuthenticationError";
|
|
95
174
|
this.status = status;
|
|
96
175
|
}
|
|
97
176
|
}
|
|
98
177
|
/**
|
|
99
178
|
* A network or server fault reaching the upload route or storage — an unreachable
|
|
100
|
-
* host, a timeout, a `5xx`, a refused redirect, storage timing out on the body,
|
|
101
|
-
*
|
|
179
|
+
* host, a timeout, a `5xx`, a refused redirect, storage timing out on the body,
|
|
180
|
+
* storage timing out or throttling the request (a `408` or a `429`), or any other
|
|
181
|
+
* unexpected `upload()` failure. `code` says which: the SDK sets it on
|
|
102
182
|
* every one it raises, so it is undefined only on one a caller constructs without
|
|
103
183
|
* it. `status` is the HTTP status when a response produced it, and undefined when
|
|
104
184
|
* none did. From `uploadFile` the wrapped `ApiResponseError` is also reachable via
|
|
105
185
|
* `cause`; `uploadWithGrant` wraps no response, because storage's error body can
|
|
106
186
|
* echo the grant's credential.
|
|
187
|
+
*
|
|
188
|
+
* Its verdict is the wrapped error's when `cause` carries one: `uploadFile` wraps the
|
|
189
|
+
* `ApiResponseError` or `ApiUnreachableError` the client's `upload()` threw, and `code` is too
|
|
190
|
+
* coarse to judge it by (a `402` plan limit is `unexpected`, like a malformed answer). Otherwise
|
|
191
|
+
* — always the case from `uploadWithGrant`, which wraps no response — `code` decides: `timeout`,
|
|
192
|
+
* `storage_timeout` and `conflict` are `runtime` and retryable, `conflict` because storage
|
|
193
|
+
* documents its `409 ConditionalRequestConflict` as retryable and the grant is not spent by it (a
|
|
194
|
+
* spent grant is the `412` of a `RejectedAssetError` with code `grant_used`); `server_error` is
|
|
195
|
+
* `runtime`, and retryable when the fallback table a refused API request reads would call its
|
|
196
|
+
* `status` retryable — any `5xx` but a `501`, which storage answers for a request it does not
|
|
197
|
+
* implement — or when it carries no status; `unexpected` is `runtime`, and retryable when that
|
|
198
|
+
* table would call its `status` retryable — storage's `408` or `429`, refused for its timing —
|
|
199
|
+
* and not retryable for any other status or none; `unreachable` is `config` and retryable, like
|
|
200
|
+
* `ApiUnreachableError`; `redirected` is `config` and not retryable; `invalid_grant_url` and no
|
|
201
|
+
* code at all are `runtime` and not retryable.
|
|
107
202
|
*/
|
|
108
203
|
export class UploadTransportError extends InputPreparationError {
|
|
109
204
|
status;
|
|
110
205
|
code;
|
|
111
206
|
constructor(message, options) {
|
|
112
|
-
super(message,
|
|
207
|
+
super(message, {
|
|
208
|
+
...options,
|
|
209
|
+
verdict: errorVerdictOf(options?.cause) ?? uploadTransportVerdict(options?.code, options?.status),
|
|
210
|
+
});
|
|
113
211
|
this.name = "UploadTransportError";
|
|
114
212
|
this.status = options?.status;
|
|
115
213
|
this.code = options?.code;
|
|
116
214
|
}
|
|
117
215
|
}
|
|
216
|
+
/** The verdict of an upload transport failure that wraps no error carrying one. */
|
|
217
|
+
function uploadTransportVerdict(code, status) {
|
|
218
|
+
switch (code) {
|
|
219
|
+
case "timeout":
|
|
220
|
+
case "storage_timeout":
|
|
221
|
+
case "conflict":
|
|
222
|
+
return makeVerdict("runtime", true);
|
|
223
|
+
case "server_error":
|
|
224
|
+
// A fault in storage may pass, but a 501 says storage does not implement the request, and
|
|
225
|
+
// sending it again will not change that. The status reads as an API's would.
|
|
226
|
+
return makeVerdict("runtime", status === undefined || fallbackVerdict(status, undefined, true).retryable);
|
|
227
|
+
case "unexpected":
|
|
228
|
+
// Storage's 408 or 429 refused the request for its timing, which a later attempt can pass;
|
|
229
|
+
// any other status, or none, says nothing of the kind.
|
|
230
|
+
return makeVerdict("runtime", status !== undefined && fallbackVerdict(status, undefined, true).retryable);
|
|
231
|
+
case "unreachable":
|
|
232
|
+
return makeVerdict("config", true);
|
|
233
|
+
case "redirected":
|
|
234
|
+
return makeVerdict("config", false);
|
|
235
|
+
default:
|
|
236
|
+
// `invalid_grant_url`, no code, and a code this version does not know.
|
|
237
|
+
return makeVerdict("runtime", false);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
118
240
|
/**
|
|
119
241
|
* Base class for the failures the artifact operations raise on their own
|
|
120
242
|
* (`fetchArtifact` / `downloadArtifacts`) — the download twin of
|
|
@@ -124,10 +246,15 @@ export class UploadTransportError extends InputPreparationError {
|
|
|
124
246
|
* operation throws only when it can produce no verdict at all. Transport
|
|
125
247
|
* failures on the resolve route (`ApiResponseError`, `ApiUnreachableError`)
|
|
126
248
|
* and the run-lifecycle errors propagate unchanged, so they are not subclasses.
|
|
249
|
+
*
|
|
250
|
+
* Its verdict is `runtime`, not retryable, unless `options.verdict` declares another: the SDK
|
|
251
|
+
* declares `input` where it refuses an argument (a `scope`, a bound, a location) and `config`
|
|
252
|
+
* where the environment refuses the download (a runtime with no filesystem, a directory that
|
|
253
|
+
* cannot be created).
|
|
127
254
|
*/
|
|
128
|
-
export class ArtifactOperationError extends
|
|
255
|
+
export class ArtifactOperationError extends PipelexRequestError {
|
|
129
256
|
constructor(message, options) {
|
|
130
|
-
super(message, options);
|
|
257
|
+
super(message, options?.verdict ?? makeVerdict("runtime", false), options);
|
|
131
258
|
this.name = "ArtifactOperationError";
|
|
132
259
|
}
|
|
133
260
|
}
|
|
@@ -159,32 +286,65 @@ export class ScopeUnavailableError extends ArtifactOperationError {
|
|
|
159
286
|
* (any other non-2xx), `too_large`, `timeout`, `network`. `status` is the
|
|
160
287
|
* store's HTTP status when one was received. `downloadArtifacts` never lets
|
|
161
288
|
* this escape: it becomes the item's `error`.
|
|
289
|
+
*
|
|
290
|
+
* Its verdict follows `code`: `invalid_storage_uri`, `forbidden`, `unsupported_url`, `not_found`
|
|
291
|
+
* and `too_large` are `input` and not retryable, since the reference or the bound must change;
|
|
292
|
+
* `plain_http_refused` is `config` and not retryable; `redirect_refused` and `store_refused` are
|
|
293
|
+
* `runtime` and not retryable; `timeout` and `network` are `runtime` and retryable; `store_error`
|
|
294
|
+
* is `runtime`, and retryable when the fallback table a refused API request reads would call its
|
|
295
|
+
* `status` retryable — a `408`, a `429` or a `5xx` other than `501` — and not retryable for any
|
|
296
|
+
* other status or none. A code this version does not know is `runtime` and not retryable.
|
|
162
297
|
*/
|
|
163
298
|
export class ArtifactFetchError extends ArtifactOperationError {
|
|
164
299
|
uri;
|
|
165
300
|
code;
|
|
166
301
|
status;
|
|
167
302
|
constructor(message, uri, code, status, options) {
|
|
168
|
-
super(message, options);
|
|
303
|
+
super(message, { ...options, verdict: artifactFetchVerdict(code, status) });
|
|
169
304
|
this.name = "ArtifactFetchError";
|
|
170
305
|
this.uri = uri;
|
|
171
306
|
this.code = code;
|
|
172
307
|
this.status = status;
|
|
173
308
|
}
|
|
174
309
|
}
|
|
310
|
+
/** The verdict of one reference's fetch failure, by its code and the store's status. */
|
|
311
|
+
function artifactFetchVerdict(code, status) {
|
|
312
|
+
switch (code) {
|
|
313
|
+
case "invalid_storage_uri":
|
|
314
|
+
case "forbidden":
|
|
315
|
+
case "unsupported_url":
|
|
316
|
+
case "not_found":
|
|
317
|
+
case "too_large":
|
|
318
|
+
return makeVerdict("input", false);
|
|
319
|
+
case "plain_http_refused":
|
|
320
|
+
return makeVerdict("config", false);
|
|
321
|
+
case "timeout":
|
|
322
|
+
case "network":
|
|
323
|
+
return makeVerdict("runtime", true);
|
|
324
|
+
case "store_error":
|
|
325
|
+
// The store's status reads as an API's would: refused for its timing (408, 429) or a fault
|
|
326
|
+
// that may pass (a 5xx) can succeed on a retry, while a 501 or a 4xx will not.
|
|
327
|
+
return makeVerdict("runtime", status !== undefined && fallbackVerdict(status, undefined, true).retryable);
|
|
328
|
+
default:
|
|
329
|
+
// `redirect_refused`, `store_refused`, and a code this version does not know.
|
|
330
|
+
return makeVerdict("runtime", false);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
175
333
|
/**
|
|
176
334
|
* The resolve route refused the caller's credential (`401` / `403`) during a
|
|
177
335
|
* `downloadArtifacts` call. No further reference can be resolved with it, so
|
|
178
336
|
* the download stops — but the files already saved are real, and `verdict`
|
|
179
337
|
* carries the result as it stood: every item saved before the refusal, and
|
|
180
338
|
* the rest marked `aborted`. `status` is the route's status; the wrapped
|
|
181
|
-
* `ApiResponseError` is reachable via `cause`.
|
|
339
|
+
* `ApiResponseError` is reachable via `cause`. (`verdict` is the download's result, not the
|
|
340
|
+
* error's own: that is `retryable` and `errorDomain`, `config` and not retryable, since the
|
|
341
|
+
* credential must change.)
|
|
182
342
|
*/
|
|
183
343
|
export class ArtifactAuthenticationError extends ArtifactOperationError {
|
|
184
344
|
status;
|
|
185
345
|
verdict;
|
|
186
346
|
constructor(message, status, verdict, options) {
|
|
187
|
-
super(message, options);
|
|
347
|
+
super(message, { ...options, verdict: makeVerdict("config", false) });
|
|
188
348
|
this.name = "ArtifactAuthenticationError";
|
|
189
349
|
this.status = status;
|
|
190
350
|
this.verdict = verdict;
|
|
@@ -198,12 +358,17 @@ export class ArtifactAuthenticationError extends ArtifactOperationError {
|
|
|
198
358
|
*
|
|
199
359
|
* `code` is the underlying network error code when available
|
|
200
360
|
* (`ECONNREFUSED`, `ENOTFOUND`, `ETIMEDOUT`, `EAI_AGAIN`, `ABORT_TIMEOUT`).
|
|
361
|
+
*
|
|
362
|
+
* Its verdict is `config` and retryable: the address or the network must be checked, and a later
|
|
363
|
+
* attempt can get through. With the code `ABORT_TIMEOUT`, the SDK's own request timeout, it is
|
|
364
|
+
* `runtime` and retryable instead: the API took the request and did not answer in time, which is
|
|
365
|
+
* no fault of the base URL.
|
|
201
366
|
*/
|
|
202
|
-
export class ApiUnreachableError extends
|
|
367
|
+
export class ApiUnreachableError extends PipelexRequestError {
|
|
203
368
|
apiUrl;
|
|
204
369
|
code;
|
|
205
370
|
constructor(message, apiUrl, code, options) {
|
|
206
|
-
super(message, options);
|
|
371
|
+
super(message, makeVerdict(code === "ABORT_TIMEOUT" ? "runtime" : "config", true), options);
|
|
207
372
|
this.name = "ApiUnreachableError";
|
|
208
373
|
this.apiUrl = apiUrl;
|
|
209
374
|
this.code = code;
|
|
@@ -214,14 +379,17 @@ export class ApiUnreachableError extends PipelineRequestError {
|
|
|
214
379
|
* hosted gateway's ~30s synchronous-request limit. The blocking path cannot
|
|
215
380
|
* run methods longer than 30s behind the hosted gateway — use the durable run
|
|
216
381
|
* lifecycle (start + poll) instead.
|
|
382
|
+
*
|
|
383
|
+
* Its verdict is `input`, not retryable: asking again meets the same limit, and the caller fixes
|
|
384
|
+
* it by starting the run and polling.
|
|
217
385
|
*/
|
|
218
|
-
export class PipelineExecuteTimeoutError extends
|
|
386
|
+
export class PipelineExecuteTimeoutError extends PipelexRequestError {
|
|
219
387
|
elapsedMs;
|
|
220
388
|
constructor(elapsedMs, options) {
|
|
221
389
|
const seconds = Math.round(elapsedMs / 1000);
|
|
222
390
|
super(`The Pipelex Hosted API times out synchronous requests after ~30s — this run took ${seconds}s. ` +
|
|
223
391
|
"The blocking execute path can't run methods longer than 30s behind the gateway. " +
|
|
224
|
-
"Start the run and poll for its result instead: `start()` then `waitForResult(runId)`.", options);
|
|
392
|
+
"Start the run and poll for its result instead: `start()` then `waitForResult(runId)`.", makeVerdict("input", false), options);
|
|
225
393
|
this.name = "PipelineExecuteTimeoutError";
|
|
226
394
|
this.elapsedMs = elapsedMs;
|
|
227
395
|
}
|
|
@@ -247,19 +415,31 @@ export class PipelineExecuteTimeoutError extends PipelineRequestError {
|
|
|
247
415
|
* report's message (`Run finished with status FAILED: <message>`), so printing the error
|
|
248
416
|
* already tells the reason.
|
|
249
417
|
* - `runId` locates the run, for a status read or a support request.
|
|
418
|
+
*
|
|
419
|
+
* Its verdict comes from the report. `errorDomain` is the report's `error_domain` when it is one
|
|
420
|
+
* of the three domains, and `runtime` otherwise, including a run with no report. `retryable` is
|
|
421
|
+
* true only when the report's `retryable` is `true`: a report that says nothing, and a run with
|
|
422
|
+
* none, read as not retryable, since starting the run again spends credit and nothing says it
|
|
423
|
+
* would succeed. The report keeps its own `retryable` as written, so a consumer that words the
|
|
424
|
+
* unknown differently still can.
|
|
250
425
|
*/
|
|
251
|
-
export class RunFailedError extends
|
|
426
|
+
export class RunFailedError extends PipelexRequestError {
|
|
252
427
|
runId;
|
|
253
428
|
status;
|
|
254
429
|
error;
|
|
255
430
|
constructor(message, runId, status, options) {
|
|
256
|
-
super(message, options?.cause === undefined ? undefined : { cause: options.cause });
|
|
431
|
+
super(message, runFailureVerdict(options?.error ?? null), options?.cause === undefined ? undefined : { cause: options.cause });
|
|
257
432
|
this.name = "RunFailedError";
|
|
258
433
|
this.runId = runId;
|
|
259
434
|
this.status = status;
|
|
260
435
|
this.error = options?.error ?? null;
|
|
261
436
|
}
|
|
262
437
|
}
|
|
438
|
+
/** The verdict of a failed run, read from its stored report. */
|
|
439
|
+
function runFailureVerdict(report) {
|
|
440
|
+
const domain = report?.error_domain;
|
|
441
|
+
return makeVerdict(isErrorDomain(domain) ? domain : "runtime", report?.retryable === true);
|
|
442
|
+
}
|
|
263
443
|
/**
|
|
264
444
|
* Thrown when a completed run cannot deliver its main stuff.
|
|
265
445
|
*
|
|
@@ -269,11 +449,13 @@ export class RunFailedError extends PipelineRequestError {
|
|
|
269
449
|
* `execute` response named a `main_stuff_name` whose stuff is absent from the returned working
|
|
270
450
|
* memory. `runId` locates the run. (An empty-but-present main stuff — `{ items: [] }`, `{ text:
|
|
271
451
|
* "" }` — is a valid output and does NOT throw; only a genuinely absent one does.)
|
|
452
|
+
*
|
|
453
|
+
* Its verdict is `runtime`, not retryable: the API broke its own contract on a completed run.
|
|
272
454
|
*/
|
|
273
|
-
export class MissingMainStuffError extends
|
|
455
|
+
export class MissingMainStuffError extends PipelexRequestError {
|
|
274
456
|
runId;
|
|
275
457
|
constructor(message, runId) {
|
|
276
|
-
super(message);
|
|
458
|
+
super(message, makeVerdict("runtime", false));
|
|
277
459
|
this.name = "MissingMainStuffError";
|
|
278
460
|
this.runId = runId;
|
|
279
461
|
}
|
|
@@ -282,12 +464,14 @@ export class MissingMainStuffError extends PipelineRequestError {
|
|
|
282
464
|
* Thrown when `waitForResult` exceeds its `timeoutMs` before the run reaches a
|
|
283
465
|
* terminal state. The run is NOT cancelled — it keeps executing server-side and
|
|
284
466
|
* can be resumed later by `runId` (the poll loop just stopped waiting).
|
|
467
|
+
*
|
|
468
|
+
* Its verdict is `runtime` and retryable: the run is still going, and waiting again can succeed.
|
|
285
469
|
*/
|
|
286
|
-
export class RunTimeoutError extends
|
|
470
|
+
export class RunTimeoutError extends PipelexRequestError {
|
|
287
471
|
runId;
|
|
288
472
|
timeoutMs;
|
|
289
473
|
constructor(message, runId, timeoutMs) {
|
|
290
|
-
super(message);
|
|
474
|
+
super(message, makeVerdict("runtime", true));
|
|
291
475
|
this.name = "RunTimeoutError";
|
|
292
476
|
this.runId = runId;
|
|
293
477
|
this.timeoutMs = timeoutMs;
|
|
@@ -301,13 +485,15 @@ export class RunTimeoutError extends PipelineRequestError {
|
|
|
301
485
|
* when it cannot hold the connection open. The run keeps executing
|
|
302
486
|
* server-side — resume by `runId` (`getRunResult` / `waitForResult` on a
|
|
303
487
|
* hosted deployment, or the `location` status resource when provided).
|
|
488
|
+
*
|
|
489
|
+
* Its verdict is `runtime` and retryable: the run is still going, and is resumed by its id.
|
|
304
490
|
*/
|
|
305
|
-
export class RunStillRunningError extends
|
|
491
|
+
export class RunStillRunningError extends PipelexRequestError {
|
|
306
492
|
runId;
|
|
307
493
|
retryAfterSeconds;
|
|
308
494
|
location;
|
|
309
495
|
constructor(message, runId, retryAfterSeconds = null, location = null, options) {
|
|
310
|
-
super(message, options);
|
|
496
|
+
super(message, makeVerdict("runtime", true), options);
|
|
311
497
|
this.name = "RunStillRunningError";
|
|
312
498
|
this.runId = runId;
|
|
313
499
|
this.retryAfterSeconds = retryAfterSeconds;
|
|
@@ -323,26 +509,61 @@ export class RunStillRunningError extends PipelineRequestError {
|
|
|
323
509
|
* it 404s those routes; only a deployment that includes the platform block
|
|
324
510
|
* (the Pipelex Hosted API) serves status/results. Distinguished from a genuine
|
|
325
511
|
* run-not-found 404, which carries the server's structured error envelope.
|
|
512
|
+
*
|
|
513
|
+
* Its verdict is `config`, not retryable: the base URL points at a bare runner without the run
|
|
514
|
+
* lifecycle.
|
|
326
515
|
*/
|
|
327
|
-
export class RunLifecycleUnavailableError extends
|
|
516
|
+
export class RunLifecycleUnavailableError extends PipelexRequestError {
|
|
328
517
|
apiUrl;
|
|
329
518
|
constructor(message, apiUrl, options) {
|
|
330
|
-
super(message, options);
|
|
519
|
+
super(message, makeVerdict("config", false), options);
|
|
331
520
|
this.name = "RunLifecycleUnavailableError";
|
|
332
521
|
this.apiUrl = apiUrl;
|
|
333
522
|
}
|
|
334
523
|
}
|
|
335
524
|
/**
|
|
336
|
-
*
|
|
525
|
+
* Thrown when a paged-list iterator (`iterateMethods`) refuses to keep following cursors.
|
|
526
|
+
*
|
|
527
|
+
* The ceiling, `pageLimit` pages, sits far beyond any real catalog, so reaching it is a
|
|
528
|
+
* server-side fault — an endpoint minting a fresh cursor forever — not a coverage limit the caller
|
|
529
|
+
* can raise. Throwing beats returning, because a silently truncated list is exactly the bug
|
|
530
|
+
* paging was introduced to remove. Its verdict is `runtime`, not retryable.
|
|
531
|
+
*/
|
|
532
|
+
export class PagingNotTerminatingError extends PipelexRequestError {
|
|
533
|
+
pageLimit;
|
|
534
|
+
constructor(message, pageLimit) {
|
|
535
|
+
super(message, makeVerdict("runtime", false));
|
|
536
|
+
this.name = "PagingNotTerminatingError";
|
|
537
|
+
this.pageLimit = pageLimit;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* A response that DID come back from the API and that the SDK cannot hand back as a result: a
|
|
542
|
+
* non-2xx refusal, with its problem document parsed, or a 2xx answer the SDK could not read —
|
|
543
|
+
* a body that is not JSON, JSON that is not the object the route answers, or a stored method
|
|
544
|
+
* whose `python` field is not the serialized file list. The second carries the answer's status
|
|
545
|
+
* and raw text, no problem member, what made it unreadable as `cause` (the parse failure, or
|
|
546
|
+
* `mthds`'s refusal of the `python` field), and the verdict the fallback gives a 2xx: `runtime`,
|
|
547
|
+
* not retryable.
|
|
337
548
|
*
|
|
338
549
|
* Every error the hosted API answers is an RFC 9457 `application/problem+json` document, and
|
|
339
550
|
* this error carries its members as typed fields, each `undefined` when the document did not
|
|
340
|
-
* carry it (a member of the wrong type reads as absent rather than as a wrong value
|
|
551
|
+
* carry it (a member of the wrong type reads as absent rather than as a wrong value, and the
|
|
552
|
+
* nested members `providerMetadata`, `migration`, `validationErrors` and `errors` are checked
|
|
553
|
+
* field by field as a failed run's stored report is) — except the verdict, which is always
|
|
554
|
+
* decided:
|
|
341
555
|
*
|
|
342
|
-
* - **The
|
|
343
|
-
* `config` (a configuration change), `runtime` (nobody beforehand) — and `
|
|
344
|
-
*
|
|
345
|
-
*
|
|
556
|
+
* - **The verdict.** `errorDomain` says who can fix the failure — `input` (the caller),
|
|
557
|
+
* `config` (a configuration change), `runtime` (nobody beforehand) — and `retryable` whether
|
|
558
|
+
* asking again can succeed. Each is the document's member when the server sent a valid one,
|
|
559
|
+
* and otherwise the SDK's fallback, read from the status, the platform `code` and whether the
|
|
560
|
+
* body names what it refused. A runner often sends `error_domain` without `retryable`, and
|
|
561
|
+
* then the domain it sent decides `retryable`: `input` and `config` are not retryable, as a
|
|
562
|
+
* stored report that says nothing is not, since the caller or the environment must change,
|
|
563
|
+
* while `runtime` takes the fallback's. Nothing on the error says which a value came from:
|
|
564
|
+
* `problemDocument` keeps what the server sent.
|
|
565
|
+
* - **The branch fields.** `errorDomain`, and `type`, the stable URI naming the error class.
|
|
566
|
+
* Branch on these, never on the HTTP status or on the wording of a message.
|
|
346
567
|
* - **The native codes.** `code` is the platform's own closed code (`conflict`, `not_found`,
|
|
347
568
|
* `pipelex_api_key_limit_reached`, …) and `errorType` the runner's open exception class
|
|
348
569
|
* name. Each is finer than `errorDomain` and specific to the surface that emits it; the
|
|
@@ -360,11 +581,11 @@ export class RunLifecycleUnavailableError extends PipelineRequestError {
|
|
|
360
581
|
* `problemDocument` is the decoded document whole, so a member this SDK does not name stays
|
|
361
582
|
* reachable without re-parsing `responseBody`, which is the raw text; it is `undefined` when
|
|
362
583
|
* the body was not a JSON object. The members `mthds`'s own `ApiResponseError` carries have the
|
|
363
|
-
* same names and types
|
|
364
|
-
* `
|
|
365
|
-
* leaves to this SDK.
|
|
584
|
+
* same names here, and the same types except the verdict, which this SDK narrows from optional
|
|
585
|
+
* to decided; the rest (`code`, `errorCategory`, `model`, `provider`, `providerMetadata`,
|
|
586
|
+
* `migration`, `errors`) are the Pipelex members the standard's client leaves to this SDK.
|
|
366
587
|
*/
|
|
367
|
-
export class ApiResponseError extends
|
|
588
|
+
export class ApiResponseError extends PipelexRequestError {
|
|
368
589
|
apiUrl;
|
|
369
590
|
status;
|
|
370
591
|
statusText;
|
|
@@ -393,24 +614,11 @@ export class ApiResponseError extends PipelineRequestError {
|
|
|
393
614
|
* lines for this request.
|
|
394
615
|
*/
|
|
395
616
|
requestId;
|
|
396
|
-
/**
|
|
397
|
-
* The body's `error_domain`: who can fix the failure. `input` — the caller (a malformed
|
|
398
|
-
* bundle, a bad argument, a missing input); `config` — a configuration change (a missing
|
|
399
|
-
* secret, a model the backend does not serve); `runtime` — nobody beforehand (a provider
|
|
400
|
-
* outage during execution). Typed open, as the server owns the vocabulary; `undefined` when
|
|
401
|
-
* the server did not classify it.
|
|
402
|
-
*/
|
|
403
|
-
errorDomain;
|
|
404
617
|
/**
|
|
405
618
|
* The body's `error_category`: the finer classification of an inference failure — known
|
|
406
619
|
* values `transient`, `configuration`, `content`, `capacity`, `ambiguous`, `unknown`.
|
|
407
620
|
*/
|
|
408
621
|
errorCategory;
|
|
409
|
-
/**
|
|
410
|
-
* The body's `retryable`: whether retrying the same request can plausibly succeed.
|
|
411
|
-
* `undefined` means unknown, which is not the same as `false`.
|
|
412
|
-
*/
|
|
413
|
-
retryable;
|
|
414
622
|
/** The body's `user_action`: what the caller should do next, when the server can say. */
|
|
415
623
|
userAction;
|
|
416
624
|
/** The body's `model`: the model an inference failure used. */
|
|
@@ -444,7 +652,7 @@ export class ApiResponseError extends PipelineRequestError {
|
|
|
444
652
|
*/
|
|
445
653
|
validationErrors;
|
|
446
654
|
constructor(message, apiUrl, status, statusText, responseBody, errorType, serverMessage, validationErrors, code, options) {
|
|
447
|
-
super(message, options?.cause === undefined ? undefined : { cause: options.cause });
|
|
655
|
+
super(message, responseVerdict(status, errorType, code, options?.problem), options?.cause === undefined ? undefined : { cause: options.cause });
|
|
448
656
|
this.name = "ApiResponseError";
|
|
449
657
|
this.apiUrl = apiUrl;
|
|
450
658
|
this.status = status;
|
|
@@ -459,9 +667,7 @@ export class ApiResponseError extends PipelineRequestError {
|
|
|
459
667
|
this.title = problem?.title;
|
|
460
668
|
this.instance = problem?.instance;
|
|
461
669
|
this.requestId = problem?.requestId;
|
|
462
|
-
this.errorDomain = problem?.errorDomain;
|
|
463
670
|
this.errorCategory = problem?.errorCategory;
|
|
464
|
-
this.retryable = problem?.retryable;
|
|
465
671
|
this.userAction = problem?.userAction;
|
|
466
672
|
this.model = problem?.model;
|
|
467
673
|
this.provider = problem?.provider;
|
|
@@ -471,4 +677,25 @@ export class ApiResponseError extends PipelineRequestError {
|
|
|
471
677
|
this.problemDocument = options?.problemDocument;
|
|
472
678
|
}
|
|
473
679
|
}
|
|
680
|
+
/**
|
|
681
|
+
* The verdict of a refused request: each member the document's own when it is valid, and the
|
|
682
|
+
* fallback's otherwise, except that a sent `input` or `config` domain with no sent `retryable` is
|
|
683
|
+
* not retryable. A `404` is named when the body carries a platform `code` or a runner
|
|
684
|
+
* `error_type`, read from the constructor's arguments, so an `ApiResponseError` a consumer builds
|
|
685
|
+
* by hand gets the verdict the client would give it.
|
|
686
|
+
*/
|
|
687
|
+
function responseVerdict(status, errorType, code, problem) {
|
|
688
|
+
const fallback = fallbackVerdict(status, code, code !== undefined || errorType !== undefined);
|
|
689
|
+
const sentDomain = problem?.errorDomain;
|
|
690
|
+
const sentRetryable = problem?.retryable;
|
|
691
|
+
if (!isErrorDomain(sentDomain)) {
|
|
692
|
+
return makeVerdict(fallback.errorDomain, typeof sentRetryable === "boolean" ? sentRetryable : fallback.retryable);
|
|
693
|
+
}
|
|
694
|
+
if (typeof sentRetryable === "boolean")
|
|
695
|
+
return makeVerdict(sentDomain, sentRetryable);
|
|
696
|
+
// The server said who fixes the failure and nothing of a retry. When the caller or the
|
|
697
|
+
// environment must change, asking again unchanged meets the same answer, whatever the status
|
|
698
|
+
// would suggest; only a `runtime` fault keeps the status's reading.
|
|
699
|
+
return makeVerdict(sentDomain, sentDomain === "runtime" ? fallback.retryable : false);
|
|
700
|
+
}
|
|
474
701
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC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} from ".
|
|
|
29
29
|
export type { GetRunResultOptions, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
|
|
30
30
|
export { summarizeUsage } from "./usage.js";
|
|
31
31
|
export type { PipeUsageSummary, RunUsagePair, UsageSummary, UsageSummaryState, UsageTokenTotals, } from "./usage.js";
|
|
32
|
-
export { ApiResponseError, ApiUnreachableError,
|
|
33
|
-
export type { ApiResponseErrorOptions, RejectedAssetCode, UploadTransportCode } from "./errors.js";
|
|
32
|
+
export { PipelexRequestError, errorVerdictOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
|
|
33
|
+
export type { ApiResponseErrorOptions, ErrorDomain, ErrorVerdict, RejectedAssetCode, UploadTransportCode, } from "./errors.js";
|
|
34
34
|
export type { FieldError, MigrationErrorBlock, ProblemDetails, ProviderErrorMetadata, RunErrorReport, UserAction, } from "./error-models.js";
|
package/dist/index.js
CHANGED
|
@@ -42,5 +42,6 @@ export { isTerminalRunStatus, isSuccessRunStatus, RUN_RESULT_ARTIFACTS } from ".
|
|
|
42
42
|
// ── Usage summary (pure — folds a run's usage pair into one null-aware reading) ──
|
|
43
43
|
export { summarizeUsage } from "./usage.js";
|
|
44
44
|
// ── Typed errors (PipelineRequestError rides the protocol re-export above) ──
|
|
45
|
-
|
|
45
|
+
// Every one carries a verdict — `retryable` and `errorDomain` — read with `errorVerdictOf`.
|
|
46
|
+
export { PipelexRequestError, errorVerdictOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
|
|
46
47
|
//# sourceMappingURL=index.js.map
|