@peac/kernel 0.11.1 → 0.11.2
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 +9 -0
- package/dist/carrier.d.ts +14 -0
- package/dist/carrier.d.ts.map +1 -1
- package/dist/error-categories.generated.d.ts +1 -1
- package/dist/errors.cjs +295 -149
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.generated.d.ts +3 -3
- package/dist/errors.generated.d.ts.map +1 -1
- package/dist/errors.mjs +295 -149
- package/dist/errors.mjs.map +1 -1
- package/dist/index.cjs +297 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +296 -149
- package/dist/index.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
package/dist/errors.cjs
CHANGED
|
@@ -168,7 +168,8 @@ var ERRORS = {
|
|
|
168
168
|
http_status: 400,
|
|
169
169
|
title: "Attribution Chain Too Deep",
|
|
170
170
|
description: "Attribution chain exceeds maximum allowed depth (8)",
|
|
171
|
-
|
|
171
|
+
retryable: false,
|
|
172
|
+
next_action: "retry_with_different_input",
|
|
172
173
|
category: "attribution"
|
|
173
174
|
},
|
|
174
175
|
E_ATTRIBUTION_CIRCULAR_CHAIN: {
|
|
@@ -176,7 +177,8 @@ var ERRORS = {
|
|
|
176
177
|
http_status: 400,
|
|
177
178
|
title: "Attribution Circular Chain",
|
|
178
179
|
description: "Circular reference detected in attribution chain",
|
|
179
|
-
|
|
180
|
+
retryable: false,
|
|
181
|
+
next_action: "retry_with_different_input",
|
|
180
182
|
category: "attribution"
|
|
181
183
|
},
|
|
182
184
|
E_ATTRIBUTION_EXPIRED: {
|
|
@@ -184,7 +186,8 @@ var ERRORS = {
|
|
|
184
186
|
http_status: 401,
|
|
185
187
|
title: "Attribution Expired",
|
|
186
188
|
description: "Attribution attestation has exceeded its expiration time",
|
|
187
|
-
|
|
189
|
+
retryable: false,
|
|
190
|
+
next_action: "retry_with_different_input",
|
|
188
191
|
category: "attribution"
|
|
189
192
|
},
|
|
190
193
|
E_ATTRIBUTION_HASH_INVALID: {
|
|
@@ -192,7 +195,8 @@ var ERRORS = {
|
|
|
192
195
|
http_status: 400,
|
|
193
196
|
title: "Attribution Hash Invalid",
|
|
194
197
|
description: "Content hash structure is invalid (wrong algorithm, encoding, or value length)",
|
|
195
|
-
|
|
198
|
+
retryable: false,
|
|
199
|
+
next_action: "retry_with_different_input",
|
|
196
200
|
category: "attribution"
|
|
197
201
|
},
|
|
198
202
|
E_ATTRIBUTION_INVALID_FORMAT: {
|
|
@@ -200,7 +204,8 @@ var ERRORS = {
|
|
|
200
204
|
http_status: 400,
|
|
201
205
|
title: "Attribution Invalid Format",
|
|
202
206
|
description: "Attribution attestation does not conform to schema",
|
|
203
|
-
|
|
207
|
+
retryable: false,
|
|
208
|
+
next_action: "retry_with_different_input",
|
|
204
209
|
category: "attribution"
|
|
205
210
|
},
|
|
206
211
|
E_ATTRIBUTION_INVALID_REF: {
|
|
@@ -208,7 +213,8 @@ var ERRORS = {
|
|
|
208
213
|
http_status: 400,
|
|
209
214
|
title: "Attribution Invalid Reference",
|
|
210
215
|
description: "Receipt reference format is invalid (must be jti:{id}, URL, or URN)",
|
|
211
|
-
|
|
216
|
+
retryable: false,
|
|
217
|
+
next_action: "retry_with_different_input",
|
|
212
218
|
category: "attribution"
|
|
213
219
|
},
|
|
214
220
|
E_ATTRIBUTION_INVALID_WEIGHT: {
|
|
@@ -216,7 +222,8 @@ var ERRORS = {
|
|
|
216
222
|
http_status: 400,
|
|
217
223
|
title: "Attribution Invalid Weight",
|
|
218
224
|
description: "Attribution weight is out of valid range (must be 0.0-1.0)",
|
|
219
|
-
|
|
225
|
+
retryable: false,
|
|
226
|
+
next_action: "retry_with_different_input",
|
|
220
227
|
category: "attribution"
|
|
221
228
|
},
|
|
222
229
|
E_ATTRIBUTION_MISSING_SOURCES: {
|
|
@@ -224,7 +231,8 @@ var ERRORS = {
|
|
|
224
231
|
http_status: 400,
|
|
225
232
|
title: "Attribution Missing Sources",
|
|
226
233
|
description: "Attribution attestation has empty sources array",
|
|
227
|
-
|
|
234
|
+
retryable: false,
|
|
235
|
+
next_action: "retry_with_different_input",
|
|
228
236
|
category: "attribution"
|
|
229
237
|
},
|
|
230
238
|
E_ATTRIBUTION_NOT_YET_VALID: {
|
|
@@ -232,7 +240,8 @@ var ERRORS = {
|
|
|
232
240
|
http_status: 401,
|
|
233
241
|
title: "Attribution Not Yet Valid",
|
|
234
242
|
description: "Attribution attestation issued_at time is in the future",
|
|
235
|
-
|
|
243
|
+
retryable: true,
|
|
244
|
+
next_action: "retry_after_delay",
|
|
236
245
|
category: "attribution"
|
|
237
246
|
},
|
|
238
247
|
E_ATTRIBUTION_RESOLUTION_FAILED: {
|
|
@@ -240,7 +249,8 @@ var ERRORS = {
|
|
|
240
249
|
http_status: 502,
|
|
241
250
|
title: "Attribution Resolution Failed",
|
|
242
251
|
description: "Failed to resolve receipt reference in attribution chain",
|
|
243
|
-
|
|
252
|
+
retryable: true,
|
|
253
|
+
next_action: "retry_after_delay",
|
|
244
254
|
category: "attribution"
|
|
245
255
|
},
|
|
246
256
|
E_ATTRIBUTION_RESOLUTION_TIMEOUT: {
|
|
@@ -248,7 +258,8 @@ var ERRORS = {
|
|
|
248
258
|
http_status: 504,
|
|
249
259
|
title: "Attribution Resolution Timeout",
|
|
250
260
|
description: "Timeout while resolving receipt reference in attribution chain",
|
|
251
|
-
|
|
261
|
+
retryable: true,
|
|
262
|
+
next_action: "retry_after_delay",
|
|
252
263
|
category: "attribution"
|
|
253
264
|
},
|
|
254
265
|
E_ATTRIBUTION_SIZE_EXCEEDED: {
|
|
@@ -256,7 +267,8 @@ var ERRORS = {
|
|
|
256
267
|
http_status: 400,
|
|
257
268
|
title: "Attribution Size Exceeded",
|
|
258
269
|
description: "Attribution attestation exceeds maximum size (64KB)",
|
|
259
|
-
|
|
270
|
+
retryable: false,
|
|
271
|
+
next_action: "retry_with_different_input",
|
|
260
272
|
category: "attribution"
|
|
261
273
|
},
|
|
262
274
|
E_ATTRIBUTION_TOO_MANY_SOURCES: {
|
|
@@ -264,7 +276,8 @@ var ERRORS = {
|
|
|
264
276
|
http_status: 400,
|
|
265
277
|
title: "Attribution Too Many Sources",
|
|
266
278
|
description: "Attribution has too many sources (maximum 100)",
|
|
267
|
-
|
|
279
|
+
retryable: false,
|
|
280
|
+
next_action: "retry_with_different_input",
|
|
268
281
|
category: "attribution"
|
|
269
282
|
},
|
|
270
283
|
E_ATTRIBUTION_UNKNOWN_USAGE: {
|
|
@@ -272,7 +285,8 @@ var ERRORS = {
|
|
|
272
285
|
http_status: 400,
|
|
273
286
|
title: "Attribution Unknown Usage",
|
|
274
287
|
description: "Attribution usage type is not recognized",
|
|
275
|
-
|
|
288
|
+
retryable: false,
|
|
289
|
+
next_action: "retry_with_different_input",
|
|
276
290
|
category: "attribution"
|
|
277
291
|
},
|
|
278
292
|
// Bundle error codes
|
|
@@ -281,7 +295,8 @@ var ERRORS = {
|
|
|
281
295
|
http_status: 400,
|
|
282
296
|
title: "Bundle Duplicate Receipt",
|
|
283
297
|
description: "Bundle contains multiple receipts with the same ID",
|
|
284
|
-
|
|
298
|
+
retryable: false,
|
|
299
|
+
next_action: "retry_with_different_input",
|
|
285
300
|
category: "bundle"
|
|
286
301
|
},
|
|
287
302
|
E_BUNDLE_HASH_MISMATCH: {
|
|
@@ -289,7 +304,8 @@ var ERRORS = {
|
|
|
289
304
|
http_status: 400,
|
|
290
305
|
title: "Bundle Hash Mismatch",
|
|
291
306
|
description: "File hash does not match value declared in manifest.json",
|
|
292
|
-
|
|
307
|
+
retryable: false,
|
|
308
|
+
next_action: "retry_with_different_input",
|
|
293
309
|
category: "bundle"
|
|
294
310
|
},
|
|
295
311
|
E_BUNDLE_INVALID_FORMAT: {
|
|
@@ -297,7 +313,8 @@ var ERRORS = {
|
|
|
297
313
|
http_status: 400,
|
|
298
314
|
title: "Bundle Invalid Format",
|
|
299
315
|
description: "Bundle archive structure is invalid (not a valid ZIP or missing required files)",
|
|
300
|
-
|
|
316
|
+
retryable: false,
|
|
317
|
+
next_action: "retry_with_different_input",
|
|
301
318
|
category: "bundle"
|
|
302
319
|
},
|
|
303
320
|
E_BUNDLE_KEY_MISSING: {
|
|
@@ -305,7 +322,8 @@ var ERRORS = {
|
|
|
305
322
|
http_status: 400,
|
|
306
323
|
title: "Bundle Key Missing",
|
|
307
324
|
description: "Required signing key not found in bundle (offline verification mode)",
|
|
308
|
-
|
|
325
|
+
retryable: false,
|
|
326
|
+
next_action: "retry_with_different_input",
|
|
309
327
|
category: "bundle"
|
|
310
328
|
},
|
|
311
329
|
E_BUNDLE_MANIFEST_INVALID: {
|
|
@@ -313,7 +331,8 @@ var ERRORS = {
|
|
|
313
331
|
http_status: 400,
|
|
314
332
|
title: "Bundle Manifest Invalid",
|
|
315
333
|
description: "manifest.json does not conform to schema or contains invalid values",
|
|
316
|
-
|
|
334
|
+
retryable: false,
|
|
335
|
+
next_action: "retry_with_different_input",
|
|
317
336
|
category: "bundle"
|
|
318
337
|
},
|
|
319
338
|
E_BUNDLE_MANIFEST_MISSING: {
|
|
@@ -321,7 +340,8 @@ var ERRORS = {
|
|
|
321
340
|
http_status: 400,
|
|
322
341
|
title: "Bundle Manifest Missing",
|
|
323
342
|
description: "manifest.json not found at bundle archive root",
|
|
324
|
-
|
|
343
|
+
retryable: false,
|
|
344
|
+
next_action: "retry_with_different_input",
|
|
325
345
|
category: "bundle"
|
|
326
346
|
},
|
|
327
347
|
E_BUNDLE_MISSING_KEYS: {
|
|
@@ -329,7 +349,8 @@ var ERRORS = {
|
|
|
329
349
|
http_status: 400,
|
|
330
350
|
title: "Bundle Missing Keys",
|
|
331
351
|
description: "No verification keys provided in bundle JWKS",
|
|
332
|
-
|
|
352
|
+
retryable: false,
|
|
353
|
+
next_action: "retry_with_different_input",
|
|
333
354
|
category: "bundle"
|
|
334
355
|
},
|
|
335
356
|
E_BUNDLE_MISSING_RECEIPTS: {
|
|
@@ -337,7 +358,8 @@ var ERRORS = {
|
|
|
337
358
|
http_status: 400,
|
|
338
359
|
title: "Bundle Missing Receipts",
|
|
339
360
|
description: "No receipts provided when creating bundle",
|
|
340
|
-
|
|
361
|
+
retryable: false,
|
|
362
|
+
next_action: "retry_with_different_input",
|
|
341
363
|
category: "bundle"
|
|
342
364
|
},
|
|
343
365
|
E_BUNDLE_PATH_TRAVERSAL: {
|
|
@@ -345,7 +367,8 @@ var ERRORS = {
|
|
|
345
367
|
http_status: 400,
|
|
346
368
|
title: "Bundle Path Traversal",
|
|
347
369
|
description: "Bundle contains path traversal attack (zip-slip vulnerability)",
|
|
348
|
-
|
|
370
|
+
retryable: false,
|
|
371
|
+
next_action: "retry_with_different_input",
|
|
349
372
|
category: "bundle"
|
|
350
373
|
},
|
|
351
374
|
E_BUNDLE_POLICY_HASH_MISMATCH: {
|
|
@@ -353,7 +376,8 @@ var ERRORS = {
|
|
|
353
376
|
http_status: 400,
|
|
354
377
|
title: "Bundle Policy Hash Mismatch",
|
|
355
378
|
description: "Policy snapshot hash does not match policy used to evaluate receipts",
|
|
356
|
-
|
|
379
|
+
retryable: false,
|
|
380
|
+
next_action: "retry_with_different_input",
|
|
357
381
|
category: "bundle"
|
|
358
382
|
},
|
|
359
383
|
E_BUNDLE_RECEIPTS_UNORDERED: {
|
|
@@ -361,7 +385,8 @@ var ERRORS = {
|
|
|
361
385
|
http_status: 400,
|
|
362
386
|
title: "Bundle Receipts Unordered",
|
|
363
387
|
description: "receipts.ndjson is not in deterministic order (issued_at, receipt_id, receipt_hash)",
|
|
364
|
-
|
|
388
|
+
retryable: false,
|
|
389
|
+
next_action: "retry_with_different_input",
|
|
365
390
|
category: "bundle"
|
|
366
391
|
},
|
|
367
392
|
E_BUNDLE_RECEIPT_INVALID: {
|
|
@@ -369,7 +394,8 @@ var ERRORS = {
|
|
|
369
394
|
http_status: 400,
|
|
370
395
|
title: "Bundle Receipt Invalid",
|
|
371
396
|
description: "Receipt JWS in bundle is malformed or missing required claims",
|
|
372
|
-
|
|
397
|
+
retryable: false,
|
|
398
|
+
next_action: "retry_with_different_input",
|
|
373
399
|
category: "bundle"
|
|
374
400
|
},
|
|
375
401
|
E_BUNDLE_SIGNATURE_INVALID: {
|
|
@@ -377,7 +403,8 @@ var ERRORS = {
|
|
|
377
403
|
http_status: 400,
|
|
378
404
|
title: "Bundle Signature Invalid",
|
|
379
405
|
description: "bundle.sig JWS verification failed over manifest hash",
|
|
380
|
-
|
|
406
|
+
retryable: false,
|
|
407
|
+
next_action: "retry_with_different_input",
|
|
381
408
|
category: "bundle"
|
|
382
409
|
},
|
|
383
410
|
E_BUNDLE_SIZE_EXCEEDED: {
|
|
@@ -385,7 +412,8 @@ var ERRORS = {
|
|
|
385
412
|
http_status: 400,
|
|
386
413
|
title: "Bundle Size Exceeded",
|
|
387
414
|
description: "Bundle exceeds size limits (entry count, entry size, or total size)",
|
|
388
|
-
|
|
415
|
+
retryable: false,
|
|
416
|
+
next_action: "retry_with_different_input",
|
|
389
417
|
category: "bundle"
|
|
390
418
|
},
|
|
391
419
|
E_BUNDLE_TIME_RANGE_INVALID: {
|
|
@@ -393,7 +421,8 @@ var ERRORS = {
|
|
|
393
421
|
http_status: 400,
|
|
394
422
|
title: "Bundle Time Range Invalid",
|
|
395
423
|
description: "Receipt issued_at is outside the bundle declared time_range",
|
|
396
|
-
|
|
424
|
+
retryable: false,
|
|
425
|
+
next_action: "retry_with_different_input",
|
|
397
426
|
category: "bundle"
|
|
398
427
|
},
|
|
399
428
|
// Control error codes
|
|
@@ -402,7 +431,8 @@ var ERRORS = {
|
|
|
402
431
|
http_status: 403,
|
|
403
432
|
title: "Control Decision Denied",
|
|
404
433
|
description: "Control engine denied authorization",
|
|
405
|
-
|
|
434
|
+
retryable: false,
|
|
435
|
+
next_action: "contact_issuer",
|
|
406
436
|
category: "control"
|
|
407
437
|
},
|
|
408
438
|
E_CONTROL_REVIEW_REQUIRED: {
|
|
@@ -410,7 +440,8 @@ var ERRORS = {
|
|
|
410
440
|
http_status: 202,
|
|
411
441
|
title: "Review Required",
|
|
412
442
|
description: "Control engine requires manual review",
|
|
413
|
-
|
|
443
|
+
retryable: true,
|
|
444
|
+
next_action: "contact_issuer",
|
|
414
445
|
category: "control"
|
|
415
446
|
},
|
|
416
447
|
// Dispute error codes
|
|
@@ -419,7 +450,8 @@ var ERRORS = {
|
|
|
419
450
|
http_status: 409,
|
|
420
451
|
title: "Dispute Duplicate",
|
|
421
452
|
description: "A dispute with this ID already exists",
|
|
422
|
-
|
|
453
|
+
retryable: false,
|
|
454
|
+
next_action: "retry_with_different_input",
|
|
423
455
|
category: "dispute"
|
|
424
456
|
},
|
|
425
457
|
E_DISPUTE_EXPIRED: {
|
|
@@ -427,7 +459,8 @@ var ERRORS = {
|
|
|
427
459
|
http_status: 401,
|
|
428
460
|
title: "Dispute Expired",
|
|
429
461
|
description: "Dispute attestation has exceeded its expiration time",
|
|
430
|
-
|
|
462
|
+
retryable: false,
|
|
463
|
+
next_action: "retry_with_different_input",
|
|
431
464
|
category: "dispute"
|
|
432
465
|
},
|
|
433
466
|
E_DISPUTE_INVALID_FORMAT: {
|
|
@@ -435,7 +468,8 @@ var ERRORS = {
|
|
|
435
468
|
http_status: 400,
|
|
436
469
|
title: "Dispute Invalid Format",
|
|
437
470
|
description: "Dispute attestation does not conform to schema",
|
|
438
|
-
|
|
471
|
+
retryable: false,
|
|
472
|
+
next_action: "retry_with_different_input",
|
|
439
473
|
category: "dispute"
|
|
440
474
|
},
|
|
441
475
|
E_DISPUTE_INVALID_GROUNDS: {
|
|
@@ -443,7 +477,8 @@ var ERRORS = {
|
|
|
443
477
|
http_status: 400,
|
|
444
478
|
title: "Dispute Invalid Grounds",
|
|
445
479
|
description: "Dispute grounds code is not recognized",
|
|
446
|
-
|
|
480
|
+
retryable: false,
|
|
481
|
+
next_action: "retry_with_different_input",
|
|
447
482
|
category: "dispute"
|
|
448
483
|
},
|
|
449
484
|
E_DISPUTE_INVALID_ID: {
|
|
@@ -451,7 +486,8 @@ var ERRORS = {
|
|
|
451
486
|
http_status: 400,
|
|
452
487
|
title: "Dispute Invalid ID",
|
|
453
488
|
description: "Dispute ID is not a valid ULID format (26 uppercase alphanumeric characters)",
|
|
454
|
-
|
|
489
|
+
retryable: false,
|
|
490
|
+
next_action: "retry_with_different_input",
|
|
455
491
|
category: "dispute"
|
|
456
492
|
},
|
|
457
493
|
E_DISPUTE_INVALID_STATE: {
|
|
@@ -459,7 +495,8 @@ var ERRORS = {
|
|
|
459
495
|
http_status: 400,
|
|
460
496
|
title: "Dispute Invalid State",
|
|
461
497
|
description: "Dispute state is not recognized",
|
|
462
|
-
|
|
498
|
+
retryable: false,
|
|
499
|
+
next_action: "retry_with_different_input",
|
|
463
500
|
category: "dispute"
|
|
464
501
|
},
|
|
465
502
|
E_DISPUTE_INVALID_TARGET_TYPE: {
|
|
@@ -467,7 +504,8 @@ var ERRORS = {
|
|
|
467
504
|
http_status: 400,
|
|
468
505
|
title: "Dispute Invalid Target Type",
|
|
469
506
|
description: "Dispute target type is not recognized (must be receipt, attribution, identity, or policy)",
|
|
470
|
-
|
|
507
|
+
retryable: false,
|
|
508
|
+
next_action: "retry_with_different_input",
|
|
471
509
|
category: "dispute"
|
|
472
510
|
},
|
|
473
511
|
E_DISPUTE_INVALID_TRANSITION: {
|
|
@@ -475,7 +513,8 @@ var ERRORS = {
|
|
|
475
513
|
http_status: 400,
|
|
476
514
|
title: "Dispute Invalid Transition",
|
|
477
515
|
description: "Invalid state transition for dispute lifecycle",
|
|
478
|
-
|
|
516
|
+
retryable: false,
|
|
517
|
+
next_action: "retry_with_different_input",
|
|
479
518
|
category: "dispute"
|
|
480
519
|
},
|
|
481
520
|
E_DISPUTE_INVALID_TYPE: {
|
|
@@ -483,7 +522,8 @@ var ERRORS = {
|
|
|
483
522
|
http_status: 400,
|
|
484
523
|
title: "Dispute Invalid Type",
|
|
485
524
|
description: "Dispute type is not recognized",
|
|
486
|
-
|
|
525
|
+
retryable: false,
|
|
526
|
+
next_action: "retry_with_different_input",
|
|
487
527
|
category: "dispute"
|
|
488
528
|
},
|
|
489
529
|
E_DISPUTE_MISSING_RESOLUTION: {
|
|
@@ -491,7 +531,8 @@ var ERRORS = {
|
|
|
491
531
|
http_status: 400,
|
|
492
532
|
title: "Dispute Missing Resolution",
|
|
493
533
|
description: "Resolution is required for terminal states (resolved, rejected, final)",
|
|
494
|
-
|
|
534
|
+
retryable: false,
|
|
535
|
+
next_action: "retry_with_different_input",
|
|
495
536
|
category: "dispute"
|
|
496
537
|
},
|
|
497
538
|
E_DISPUTE_NOT_YET_VALID: {
|
|
@@ -499,7 +540,8 @@ var ERRORS = {
|
|
|
499
540
|
http_status: 401,
|
|
500
541
|
title: "Dispute Not Yet Valid",
|
|
501
542
|
description: "Dispute attestation issued_at time is in the future",
|
|
502
|
-
|
|
543
|
+
retryable: true,
|
|
544
|
+
next_action: "retry_after_delay",
|
|
503
545
|
category: "dispute"
|
|
504
546
|
},
|
|
505
547
|
E_DISPUTE_OTHER_REQUIRES_DESCRIPTION: {
|
|
@@ -507,7 +549,8 @@ var ERRORS = {
|
|
|
507
549
|
http_status: 400,
|
|
508
550
|
title: "Dispute Other Requires Description",
|
|
509
551
|
description: "Dispute type 'other' requires description of at least 50 characters",
|
|
510
|
-
|
|
552
|
+
retryable: false,
|
|
553
|
+
next_action: "retry_with_different_input",
|
|
511
554
|
category: "dispute"
|
|
512
555
|
},
|
|
513
556
|
E_DISPUTE_RESOLUTION_NOT_ALLOWED: {
|
|
@@ -515,7 +558,8 @@ var ERRORS = {
|
|
|
515
558
|
http_status: 400,
|
|
516
559
|
title: "Dispute Resolution Not Allowed",
|
|
517
560
|
description: "Resolution is only valid for terminal states",
|
|
518
|
-
|
|
561
|
+
retryable: false,
|
|
562
|
+
next_action: "retry_with_different_input",
|
|
519
563
|
category: "dispute"
|
|
520
564
|
},
|
|
521
565
|
E_DISPUTE_TARGET_NOT_FOUND: {
|
|
@@ -523,7 +567,8 @@ var ERRORS = {
|
|
|
523
567
|
http_status: 404,
|
|
524
568
|
title: "Dispute Target Not Found",
|
|
525
569
|
description: "The target receipt, attribution, or identity being disputed was not found",
|
|
526
|
-
|
|
570
|
+
retryable: true,
|
|
571
|
+
next_action: "retry_after_delay",
|
|
527
572
|
category: "dispute"
|
|
528
573
|
},
|
|
529
574
|
// Identity error codes
|
|
@@ -532,7 +577,8 @@ var ERRORS = {
|
|
|
532
577
|
http_status: 400,
|
|
533
578
|
title: "Identity Binding Future",
|
|
534
579
|
description: "Identity binding signed_at timestamp is in the future",
|
|
535
|
-
|
|
580
|
+
retryable: false,
|
|
581
|
+
next_action: "retry_with_different_input",
|
|
536
582
|
category: "identity"
|
|
537
583
|
},
|
|
538
584
|
E_IDENTITY_BINDING_MISMATCH: {
|
|
@@ -540,7 +586,8 @@ var ERRORS = {
|
|
|
540
586
|
http_status: 400,
|
|
541
587
|
title: "Identity Binding Mismatch",
|
|
542
588
|
description: "Identity binding does not match the request being verified",
|
|
543
|
-
|
|
589
|
+
retryable: false,
|
|
590
|
+
next_action: "retry_with_different_input",
|
|
544
591
|
category: "identity"
|
|
545
592
|
},
|
|
546
593
|
E_IDENTITY_BINDING_STALE: {
|
|
@@ -548,7 +595,8 @@ var ERRORS = {
|
|
|
548
595
|
http_status: 401,
|
|
549
596
|
title: "Identity Binding Stale",
|
|
550
597
|
description: "Identity binding is too old and requires fresh binding",
|
|
551
|
-
|
|
598
|
+
retryable: true,
|
|
599
|
+
next_action: "retry_after_delay",
|
|
552
600
|
category: "identity"
|
|
553
601
|
},
|
|
554
602
|
E_IDENTITY_DIRECTORY_UNAVAILABLE: {
|
|
@@ -556,7 +604,8 @@ var ERRORS = {
|
|
|
556
604
|
http_status: 503,
|
|
557
605
|
title: "Identity Directory Unavailable",
|
|
558
606
|
description: "Failed to fetch agent key directory",
|
|
559
|
-
|
|
607
|
+
retryable: true,
|
|
608
|
+
next_action: "retry_after_delay",
|
|
560
609
|
category: "identity"
|
|
561
610
|
},
|
|
562
611
|
E_IDENTITY_EXPIRED: {
|
|
@@ -564,7 +613,8 @@ var ERRORS = {
|
|
|
564
613
|
http_status: 401,
|
|
565
614
|
title: "Identity Expired",
|
|
566
615
|
description: "Agent identity attestation has exceeded its expiration time",
|
|
567
|
-
|
|
616
|
+
retryable: false,
|
|
617
|
+
next_action: "refresh_attestation",
|
|
568
618
|
category: "identity"
|
|
569
619
|
},
|
|
570
620
|
E_IDENTITY_INVALID_FORMAT: {
|
|
@@ -572,7 +622,8 @@ var ERRORS = {
|
|
|
572
622
|
http_status: 400,
|
|
573
623
|
title: "Identity Invalid Format",
|
|
574
624
|
description: "Agent identity attestation does not conform to schema",
|
|
575
|
-
|
|
625
|
+
retryable: false,
|
|
626
|
+
next_action: "retry_with_different_input",
|
|
576
627
|
category: "identity"
|
|
577
628
|
},
|
|
578
629
|
E_IDENTITY_KEY_EXPIRED: {
|
|
@@ -580,7 +631,8 @@ var ERRORS = {
|
|
|
580
631
|
http_status: 401,
|
|
581
632
|
title: "Identity Key Expired",
|
|
582
633
|
description: "Agent signing key has expired per directory metadata",
|
|
583
|
-
|
|
634
|
+
retryable: false,
|
|
635
|
+
next_action: "refresh_attestation",
|
|
584
636
|
category: "identity"
|
|
585
637
|
},
|
|
586
638
|
E_IDENTITY_KEY_REVOKED: {
|
|
@@ -588,7 +640,8 @@ var ERRORS = {
|
|
|
588
640
|
http_status: 401,
|
|
589
641
|
title: "Identity Key Revoked",
|
|
590
642
|
description: "Agent signing key has been explicitly revoked",
|
|
591
|
-
|
|
643
|
+
retryable: false,
|
|
644
|
+
next_action: "refresh_attestation",
|
|
592
645
|
category: "identity"
|
|
593
646
|
},
|
|
594
647
|
E_IDENTITY_KEY_UNKNOWN: {
|
|
@@ -596,7 +649,8 @@ var ERRORS = {
|
|
|
596
649
|
http_status: 401,
|
|
597
650
|
title: "Identity Key Unknown",
|
|
598
651
|
description: "Key ID not found in agent key directory",
|
|
599
|
-
|
|
652
|
+
retryable: true,
|
|
653
|
+
next_action: "retry_after_delay",
|
|
600
654
|
category: "identity"
|
|
601
655
|
},
|
|
602
656
|
E_IDENTITY_MISSING: {
|
|
@@ -604,7 +658,8 @@ var ERRORS = {
|
|
|
604
658
|
http_status: 401,
|
|
605
659
|
title: "Identity Missing",
|
|
606
660
|
description: "No agent identity attestation provided in request",
|
|
607
|
-
|
|
661
|
+
retryable: false,
|
|
662
|
+
next_action: "retry_with_different_input",
|
|
608
663
|
category: "identity"
|
|
609
664
|
},
|
|
610
665
|
E_IDENTITY_NOT_YET_VALID: {
|
|
@@ -612,7 +667,8 @@ var ERRORS = {
|
|
|
612
667
|
http_status: 401,
|
|
613
668
|
title: "Identity Not Yet Valid",
|
|
614
669
|
description: "Agent identity attestation issued_at time is in the future",
|
|
615
|
-
|
|
670
|
+
retryable: true,
|
|
671
|
+
next_action: "retry_after_delay",
|
|
616
672
|
category: "identity"
|
|
617
673
|
},
|
|
618
674
|
E_IDENTITY_PROOF_UNSUPPORTED: {
|
|
@@ -620,7 +676,8 @@ var ERRORS = {
|
|
|
620
676
|
http_status: 400,
|
|
621
677
|
title: "Identity Proof Unsupported",
|
|
622
678
|
description: "Agent identity proof method is not supported",
|
|
623
|
-
|
|
679
|
+
retryable: false,
|
|
680
|
+
next_action: "retry_with_different_input",
|
|
624
681
|
category: "identity"
|
|
625
682
|
},
|
|
626
683
|
E_IDENTITY_SIG_INVALID: {
|
|
@@ -628,7 +685,8 @@ var ERRORS = {
|
|
|
628
685
|
http_status: 401,
|
|
629
686
|
title: "Identity Signature Invalid",
|
|
630
687
|
description: "Agent identity proof signature verification failed",
|
|
631
|
-
|
|
688
|
+
retryable: false,
|
|
689
|
+
next_action: "retry_with_different_input",
|
|
632
690
|
category: "identity"
|
|
633
691
|
},
|
|
634
692
|
// Infrastructure error codes
|
|
@@ -637,7 +695,8 @@ var ERRORS = {
|
|
|
637
695
|
http_status: 503,
|
|
638
696
|
title: "Circuit Breaker Open",
|
|
639
697
|
description: "Service temporarily unavailable due to circuit breaker",
|
|
640
|
-
|
|
698
|
+
retryable: true,
|
|
699
|
+
next_action: "retry_after_delay",
|
|
641
700
|
category: "infrastructure"
|
|
642
701
|
},
|
|
643
702
|
E_INTERNAL: {
|
|
@@ -645,7 +704,8 @@ var ERRORS = {
|
|
|
645
704
|
http_status: 500,
|
|
646
705
|
title: "Internal Error",
|
|
647
706
|
description: "An unexpected internal error occurred during verification",
|
|
648
|
-
|
|
707
|
+
retryable: true,
|
|
708
|
+
next_action: "retry_after_delay",
|
|
649
709
|
category: "infrastructure"
|
|
650
710
|
},
|
|
651
711
|
E_JWKS_FETCH_FAILED: {
|
|
@@ -653,7 +713,8 @@ var ERRORS = {
|
|
|
653
713
|
http_status: 503,
|
|
654
714
|
title: "JWKS Fetch Failed",
|
|
655
715
|
description: "Failed to fetch public keys from JWKS endpoint",
|
|
656
|
-
|
|
716
|
+
retryable: true,
|
|
717
|
+
next_action: "retry_after_delay",
|
|
657
718
|
category: "infrastructure"
|
|
658
719
|
},
|
|
659
720
|
E_RATE_LIMITED: {
|
|
@@ -661,7 +722,8 @@ var ERRORS = {
|
|
|
661
722
|
http_status: 429,
|
|
662
723
|
title: "Rate Limited",
|
|
663
724
|
description: "Too many requests, please retry later",
|
|
664
|
-
|
|
725
|
+
retryable: true,
|
|
726
|
+
next_action: "retry_after_delay",
|
|
665
727
|
category: "infrastructure"
|
|
666
728
|
},
|
|
667
729
|
// Interaction error codes
|
|
@@ -670,7 +732,8 @@ var ERRORS = {
|
|
|
670
732
|
http_status: 400,
|
|
671
733
|
title: "Interaction Invalid Digest",
|
|
672
734
|
description: "Digest structure is invalid (wrong value format or missing bytes)",
|
|
673
|
-
|
|
735
|
+
retryable: false,
|
|
736
|
+
next_action: "retry_with_different_input",
|
|
674
737
|
category: "interaction"
|
|
675
738
|
},
|
|
676
739
|
E_INTERACTION_INVALID_DIGEST_ALG: {
|
|
@@ -678,7 +741,8 @@ var ERRORS = {
|
|
|
678
741
|
http_status: 400,
|
|
679
742
|
title: "Interaction Invalid Digest Algorithm",
|
|
680
743
|
description: "Digest algorithm is not in the canonical set (sha-256, sha-256:trunc-64k, sha-256:trunc-1m)",
|
|
681
|
-
|
|
744
|
+
retryable: false,
|
|
745
|
+
next_action: "retry_with_different_input",
|
|
682
746
|
category: "interaction"
|
|
683
747
|
},
|
|
684
748
|
E_INTERACTION_INVALID_EXTENSION_KEY: {
|
|
@@ -686,7 +750,8 @@ var ERRORS = {
|
|
|
686
750
|
http_status: 400,
|
|
687
751
|
title: "Interaction Invalid Extension Key",
|
|
688
752
|
description: "Extension key does not match required format (reverse-DNS/name[@version])",
|
|
689
|
-
|
|
753
|
+
retryable: false,
|
|
754
|
+
next_action: "retry_with_different_input",
|
|
690
755
|
category: "interaction"
|
|
691
756
|
},
|
|
692
757
|
E_INTERACTION_INVALID_FORMAT: {
|
|
@@ -694,7 +759,8 @@ var ERRORS = {
|
|
|
694
759
|
http_status: 400,
|
|
695
760
|
title: "Interaction Invalid Format",
|
|
696
761
|
description: "Interaction evidence does not conform to InteractionEvidenceV01 schema",
|
|
697
|
-
|
|
762
|
+
retryable: false,
|
|
763
|
+
next_action: "retry_with_different_input",
|
|
698
764
|
category: "interaction"
|
|
699
765
|
},
|
|
700
766
|
E_INTERACTION_INVALID_KIND_FORMAT: {
|
|
@@ -702,7 +768,8 @@ var ERRORS = {
|
|
|
702
768
|
http_status: 400,
|
|
703
769
|
title: "Interaction Invalid Kind Format",
|
|
704
770
|
description: "Interaction kind does not match required format (lowercase, 2-128 chars, starts with letter)",
|
|
705
|
-
|
|
771
|
+
retryable: false,
|
|
772
|
+
next_action: "retry_with_different_input",
|
|
706
773
|
category: "interaction"
|
|
707
774
|
},
|
|
708
775
|
E_INTERACTION_INVALID_TIMING: {
|
|
@@ -710,7 +777,8 @@ var ERRORS = {
|
|
|
710
777
|
http_status: 400,
|
|
711
778
|
title: "Interaction Invalid Timing",
|
|
712
779
|
description: "Timing constraint violated (completed_at < started_at or invalid datetime format)",
|
|
713
|
-
|
|
780
|
+
retryable: false,
|
|
781
|
+
next_action: "retry_with_different_input",
|
|
714
782
|
category: "interaction"
|
|
715
783
|
},
|
|
716
784
|
E_INTERACTION_KIND_RESERVED: {
|
|
@@ -718,7 +786,8 @@ var ERRORS = {
|
|
|
718
786
|
http_status: 400,
|
|
719
787
|
title: "Interaction Kind Reserved",
|
|
720
788
|
description: "Interaction kind uses reserved prefix (peac.*, org.peacprotocol.*) but is not in the well-known registry",
|
|
721
|
-
|
|
789
|
+
retryable: false,
|
|
790
|
+
next_action: "retry_with_different_input",
|
|
722
791
|
category: "interaction"
|
|
723
792
|
},
|
|
724
793
|
E_INTERACTION_MISSING_ERROR_DETAIL: {
|
|
@@ -726,7 +795,8 @@ var ERRORS = {
|
|
|
726
795
|
http_status: 400,
|
|
727
796
|
title: "Interaction Missing Error Detail",
|
|
728
797
|
description: "error_code or extensions required when result.status is error",
|
|
729
|
-
|
|
798
|
+
retryable: false,
|
|
799
|
+
next_action: "retry_with_different_input",
|
|
730
800
|
category: "interaction"
|
|
731
801
|
},
|
|
732
802
|
E_INTERACTION_MISSING_EXECUTOR: {
|
|
@@ -734,7 +804,8 @@ var ERRORS = {
|
|
|
734
804
|
http_status: 400,
|
|
735
805
|
title: "Interaction Missing Executor",
|
|
736
806
|
description: "Interaction evidence is missing required executor or executor.platform field",
|
|
737
|
-
|
|
807
|
+
retryable: false,
|
|
808
|
+
next_action: "retry_with_different_input",
|
|
738
809
|
category: "interaction"
|
|
739
810
|
},
|
|
740
811
|
E_INTERACTION_MISSING_ID: {
|
|
@@ -742,7 +813,8 @@ var ERRORS = {
|
|
|
742
813
|
http_status: 400,
|
|
743
814
|
title: "Interaction Missing ID",
|
|
744
815
|
description: "Interaction evidence is missing required interaction_id field",
|
|
745
|
-
|
|
816
|
+
retryable: false,
|
|
817
|
+
next_action: "retry_with_different_input",
|
|
746
818
|
category: "interaction"
|
|
747
819
|
},
|
|
748
820
|
E_INTERACTION_MISSING_KIND: {
|
|
@@ -750,7 +822,8 @@ var ERRORS = {
|
|
|
750
822
|
http_status: 400,
|
|
751
823
|
title: "Interaction Missing Kind",
|
|
752
824
|
description: "Interaction evidence is missing required kind field",
|
|
753
|
-
|
|
825
|
+
retryable: false,
|
|
826
|
+
next_action: "retry_with_different_input",
|
|
754
827
|
category: "interaction"
|
|
755
828
|
},
|
|
756
829
|
E_INTERACTION_MISSING_RESULT: {
|
|
@@ -758,7 +831,8 @@ var ERRORS = {
|
|
|
758
831
|
http_status: 400,
|
|
759
832
|
title: "Interaction Missing Result",
|
|
760
833
|
description: "result.status is required when output is present",
|
|
761
|
-
|
|
834
|
+
retryable: false,
|
|
835
|
+
next_action: "retry_with_different_input",
|
|
762
836
|
category: "interaction"
|
|
763
837
|
},
|
|
764
838
|
E_INTERACTION_MISSING_STARTED_AT: {
|
|
@@ -766,7 +840,8 @@ var ERRORS = {
|
|
|
766
840
|
http_status: 400,
|
|
767
841
|
title: "Interaction Missing Started At",
|
|
768
842
|
description: "Interaction evidence is missing required started_at field",
|
|
769
|
-
|
|
843
|
+
retryable: false,
|
|
844
|
+
next_action: "retry_with_different_input",
|
|
770
845
|
category: "interaction"
|
|
771
846
|
},
|
|
772
847
|
E_INTERACTION_MISSING_TARGET: {
|
|
@@ -774,7 +849,8 @@ var ERRORS = {
|
|
|
774
849
|
http_status: 400,
|
|
775
850
|
title: "Interaction Missing Target",
|
|
776
851
|
description: "Kind prefix requires matching target field (tool.* needs tool, http.*/fs.* need resource)",
|
|
777
|
-
|
|
852
|
+
retryable: false,
|
|
853
|
+
next_action: "retry_with_different_input",
|
|
778
854
|
category: "interaction"
|
|
779
855
|
},
|
|
780
856
|
// Ucp error codes
|
|
@@ -783,7 +859,8 @@ var ERRORS = {
|
|
|
783
859
|
http_status: 500,
|
|
784
860
|
title: "UCP Evidence Serialization Failed",
|
|
785
861
|
description: "Failed to serialize UCP evidence to YAML format",
|
|
786
|
-
|
|
862
|
+
retryable: false,
|
|
863
|
+
next_action: "retry_with_different_input",
|
|
787
864
|
category: "ucp"
|
|
788
865
|
},
|
|
789
866
|
E_UCP_KEY_ALGORITHM_MISMATCH: {
|
|
@@ -791,7 +868,8 @@ var ERRORS = {
|
|
|
791
868
|
http_status: 401,
|
|
792
869
|
title: "UCP Key Algorithm Mismatch",
|
|
793
870
|
description: "Key type is not EC as required for ECDSA signatures",
|
|
794
|
-
|
|
871
|
+
retryable: false,
|
|
872
|
+
next_action: "retry_with_different_input",
|
|
795
873
|
category: "ucp"
|
|
796
874
|
},
|
|
797
875
|
E_UCP_KEY_CURVE_MISMATCH: {
|
|
@@ -799,7 +877,8 @@ var ERRORS = {
|
|
|
799
877
|
http_status: 401,
|
|
800
878
|
title: "UCP Key Curve Mismatch",
|
|
801
879
|
description: "Key curve does not match signature algorithm (ES256=P-256, ES384=P-384, ES512=P-521)",
|
|
802
|
-
|
|
880
|
+
retryable: false,
|
|
881
|
+
next_action: "retry_with_different_input",
|
|
803
882
|
category: "ucp"
|
|
804
883
|
},
|
|
805
884
|
E_UCP_KEY_NOT_FOUND: {
|
|
@@ -807,7 +886,8 @@ var ERRORS = {
|
|
|
807
886
|
http_status: 401,
|
|
808
887
|
title: "UCP Key Not Found",
|
|
809
888
|
description: "Key ID from signature not found in business UCP profile",
|
|
810
|
-
|
|
889
|
+
retryable: true,
|
|
890
|
+
next_action: "retry_after_delay",
|
|
811
891
|
category: "ucp"
|
|
812
892
|
},
|
|
813
893
|
E_UCP_ORDER_INVALID: {
|
|
@@ -815,7 +895,8 @@ var ERRORS = {
|
|
|
815
895
|
http_status: 400,
|
|
816
896
|
title: "UCP Order Invalid",
|
|
817
897
|
description: "UCP order object does not conform to expected schema",
|
|
818
|
-
|
|
898
|
+
retryable: false,
|
|
899
|
+
next_action: "retry_with_different_input",
|
|
819
900
|
category: "ucp"
|
|
820
901
|
},
|
|
821
902
|
E_UCP_ORDER_MISSING_ID: {
|
|
@@ -823,7 +904,8 @@ var ERRORS = {
|
|
|
823
904
|
http_status: 400,
|
|
824
905
|
title: "UCP Order Missing ID",
|
|
825
906
|
description: "UCP order is missing required id field",
|
|
826
|
-
|
|
907
|
+
retryable: false,
|
|
908
|
+
next_action: "retry_with_different_input",
|
|
827
909
|
category: "ucp"
|
|
828
910
|
},
|
|
829
911
|
E_UCP_ORDER_MISSING_LINE_ITEMS: {
|
|
@@ -831,7 +913,8 @@ var ERRORS = {
|
|
|
831
913
|
http_status: 400,
|
|
832
914
|
title: "UCP Order Missing Line Items",
|
|
833
915
|
description: "UCP order is missing required line_items array",
|
|
834
|
-
|
|
916
|
+
retryable: false,
|
|
917
|
+
next_action: "retry_with_different_input",
|
|
835
918
|
category: "ucp"
|
|
836
919
|
},
|
|
837
920
|
E_UCP_ORDER_MISSING_TOTALS: {
|
|
@@ -839,7 +922,8 @@ var ERRORS = {
|
|
|
839
922
|
http_status: 400,
|
|
840
923
|
title: "UCP Order Missing Totals",
|
|
841
924
|
description: "UCP order is missing required totals array or total entry",
|
|
842
|
-
|
|
925
|
+
retryable: false,
|
|
926
|
+
next_action: "retry_with_different_input",
|
|
843
927
|
category: "ucp"
|
|
844
928
|
},
|
|
845
929
|
E_UCP_PAYLOAD_EMPTY: {
|
|
@@ -847,7 +931,8 @@ var ERRORS = {
|
|
|
847
931
|
http_status: 400,
|
|
848
932
|
title: "UCP Payload Empty",
|
|
849
933
|
description: "Webhook request body is empty",
|
|
850
|
-
|
|
934
|
+
retryable: false,
|
|
935
|
+
next_action: "retry_with_different_input",
|
|
851
936
|
category: "ucp"
|
|
852
937
|
},
|
|
853
938
|
E_UCP_PAYLOAD_NOT_JSON: {
|
|
@@ -855,7 +940,8 @@ var ERRORS = {
|
|
|
855
940
|
http_status: 400,
|
|
856
941
|
title: "UCP Payload Not JSON",
|
|
857
942
|
description: "Webhook request body is not valid JSON",
|
|
858
|
-
|
|
943
|
+
retryable: false,
|
|
944
|
+
next_action: "retry_with_different_input",
|
|
859
945
|
category: "ucp"
|
|
860
946
|
},
|
|
861
947
|
E_UCP_PAYLOAD_TOO_LARGE: {
|
|
@@ -863,7 +949,8 @@ var ERRORS = {
|
|
|
863
949
|
http_status: 400,
|
|
864
950
|
title: "UCP Payload Too Large",
|
|
865
951
|
description: "Webhook request body exceeds maximum allowed size",
|
|
866
|
-
|
|
952
|
+
retryable: false,
|
|
953
|
+
next_action: "retry_with_different_input",
|
|
867
954
|
category: "ucp"
|
|
868
955
|
},
|
|
869
956
|
E_UCP_PROFILE_FETCH_FAILED: {
|
|
@@ -871,7 +958,8 @@ var ERRORS = {
|
|
|
871
958
|
http_status: 502,
|
|
872
959
|
title: "UCP Profile Fetch Failed",
|
|
873
960
|
description: "Failed to fetch business UCP profile from /.well-known/ucp",
|
|
874
|
-
|
|
961
|
+
retryable: true,
|
|
962
|
+
next_action: "retry_after_delay",
|
|
875
963
|
category: "ucp"
|
|
876
964
|
},
|
|
877
965
|
E_UCP_PROFILE_INVALID: {
|
|
@@ -879,7 +967,8 @@ var ERRORS = {
|
|
|
879
967
|
http_status: 502,
|
|
880
968
|
title: "UCP Profile Invalid",
|
|
881
969
|
description: "Business UCP profile does not conform to expected schema",
|
|
882
|
-
|
|
970
|
+
retryable: false,
|
|
971
|
+
next_action: "retry_with_different_input",
|
|
883
972
|
category: "ucp"
|
|
884
973
|
},
|
|
885
974
|
E_UCP_PROFILE_NO_SIGNING_KEYS: {
|
|
@@ -887,7 +976,8 @@ var ERRORS = {
|
|
|
887
976
|
http_status: 502,
|
|
888
977
|
title: "UCP Profile No Signing Keys",
|
|
889
978
|
description: "Business UCP profile has empty or missing signing_keys array",
|
|
890
|
-
|
|
979
|
+
retryable: false,
|
|
980
|
+
next_action: "retry_with_different_input",
|
|
891
981
|
category: "ucp"
|
|
892
982
|
},
|
|
893
983
|
E_UCP_SIGNATURE_ALGORITHM_UNSUPPORTED: {
|
|
@@ -895,7 +985,8 @@ var ERRORS = {
|
|
|
895
985
|
http_status: 400,
|
|
896
986
|
title: "UCP Signature Algorithm Unsupported",
|
|
897
987
|
description: "Signature algorithm is not ES256, ES384, or ES512",
|
|
898
|
-
|
|
988
|
+
retryable: false,
|
|
989
|
+
next_action: "retry_with_different_input",
|
|
899
990
|
category: "ucp"
|
|
900
991
|
},
|
|
901
992
|
E_UCP_SIGNATURE_B64_INVALID: {
|
|
@@ -903,7 +994,8 @@ var ERRORS = {
|
|
|
903
994
|
http_status: 400,
|
|
904
995
|
title: "UCP Signature b64 Invalid",
|
|
905
996
|
description: "b64=false requires 'b64' in 'crit' array per RFC 7797",
|
|
906
|
-
|
|
997
|
+
retryable: false,
|
|
998
|
+
next_action: "retry_with_different_input",
|
|
907
999
|
category: "ucp"
|
|
908
1000
|
},
|
|
909
1001
|
E_UCP_SIGNATURE_INVALID: {
|
|
@@ -911,7 +1003,8 @@ var ERRORS = {
|
|
|
911
1003
|
http_status: 401,
|
|
912
1004
|
title: "UCP Signature Invalid",
|
|
913
1005
|
description: "Webhook signature verification failed against payload",
|
|
914
|
-
|
|
1006
|
+
retryable: false,
|
|
1007
|
+
next_action: "retry_with_different_input",
|
|
915
1008
|
category: "ucp"
|
|
916
1009
|
},
|
|
917
1010
|
E_UCP_SIGNATURE_MALFORMED: {
|
|
@@ -919,7 +1012,8 @@ var ERRORS = {
|
|
|
919
1012
|
http_status: 400,
|
|
920
1013
|
title: "UCP Signature Malformed",
|
|
921
1014
|
description: "Request-Signature header is not a valid detached JWS (RFC 7797)",
|
|
922
|
-
|
|
1015
|
+
retryable: false,
|
|
1016
|
+
next_action: "retry_with_different_input",
|
|
923
1017
|
category: "ucp"
|
|
924
1018
|
},
|
|
925
1019
|
E_UCP_SIGNATURE_MISSING: {
|
|
@@ -927,7 +1021,8 @@ var ERRORS = {
|
|
|
927
1021
|
http_status: 400,
|
|
928
1022
|
title: "UCP Signature Missing",
|
|
929
1023
|
description: "Request-Signature header is missing from UCP webhook request",
|
|
930
|
-
|
|
1024
|
+
retryable: false,
|
|
1025
|
+
next_action: "retry_with_different_input",
|
|
931
1026
|
category: "ucp"
|
|
932
1027
|
},
|
|
933
1028
|
E_UCP_VERIFICATION_FAILED: {
|
|
@@ -935,7 +1030,8 @@ var ERRORS = {
|
|
|
935
1030
|
http_status: 401,
|
|
936
1031
|
title: "UCP Verification Failed",
|
|
937
1032
|
description: "All verification attempts failed (raw and JCS canonicalized)",
|
|
938
|
-
|
|
1033
|
+
retryable: false,
|
|
1034
|
+
next_action: "retry_with_different_input",
|
|
939
1035
|
category: "ucp"
|
|
940
1036
|
},
|
|
941
1037
|
// Validation error codes
|
|
@@ -944,7 +1040,8 @@ var ERRORS = {
|
|
|
944
1040
|
http_status: 400,
|
|
945
1041
|
title: "Kernel Constraint Violation",
|
|
946
1042
|
description: "Receipt claims exceed a kernel constraint (max keys, max depth, max string length, max evidence bytes, or similar structural limit)",
|
|
947
|
-
|
|
1043
|
+
retryable: false,
|
|
1044
|
+
next_action: "retry_with_different_input",
|
|
948
1045
|
category: "validation"
|
|
949
1046
|
},
|
|
950
1047
|
E_EVIDENCE_NOT_JSON: {
|
|
@@ -952,7 +1049,8 @@ var ERRORS = {
|
|
|
952
1049
|
http_status: 400,
|
|
953
1050
|
title: "Evidence Not JSON-Safe",
|
|
954
1051
|
description: "Evidence contains non-JSON-safe values (NaN, Infinity, undefined, BigInt, Date, Map, Set, functions, symbols, class instances, or cycles)",
|
|
955
|
-
|
|
1052
|
+
retryable: false,
|
|
1053
|
+
next_action: "retry_with_different_input",
|
|
956
1054
|
category: "validation"
|
|
957
1055
|
},
|
|
958
1056
|
E_EXPIRED: {
|
|
@@ -960,7 +1058,8 @@ var ERRORS = {
|
|
|
960
1058
|
http_status: 400,
|
|
961
1059
|
title: "Receipt Expired",
|
|
962
1060
|
description: "Receipt has exceeded its expiration time",
|
|
963
|
-
|
|
1061
|
+
retryable: false,
|
|
1062
|
+
next_action: "retry_with_different_input",
|
|
964
1063
|
category: "validation"
|
|
965
1064
|
},
|
|
966
1065
|
E_INVALID_AMOUNT: {
|
|
@@ -968,7 +1067,8 @@ var ERRORS = {
|
|
|
968
1067
|
http_status: 400,
|
|
969
1068
|
title: "Invalid Amount",
|
|
970
1069
|
description: "Payment amount is invalid or out of allowed range",
|
|
971
|
-
|
|
1070
|
+
retryable: false,
|
|
1071
|
+
next_action: "retry_with_different_input",
|
|
972
1072
|
category: "validation"
|
|
973
1073
|
},
|
|
974
1074
|
E_INVALID_AUDIENCE: {
|
|
@@ -976,7 +1076,8 @@ var ERRORS = {
|
|
|
976
1076
|
http_status: 400,
|
|
977
1077
|
title: "Invalid Audience",
|
|
978
1078
|
description: "Receipt audience claim does not match expected value",
|
|
979
|
-
|
|
1079
|
+
retryable: false,
|
|
1080
|
+
next_action: "retry_with_different_input",
|
|
980
1081
|
category: "validation"
|
|
981
1082
|
},
|
|
982
1083
|
E_INVALID_CURRENCY: {
|
|
@@ -984,7 +1085,8 @@ var ERRORS = {
|
|
|
984
1085
|
http_status: 400,
|
|
985
1086
|
title: "Invalid Currency",
|
|
986
1087
|
description: "Currency code is not a valid ISO 4217 code",
|
|
987
|
-
|
|
1088
|
+
retryable: false,
|
|
1089
|
+
next_action: "retry_with_different_input",
|
|
988
1090
|
category: "validation"
|
|
989
1091
|
},
|
|
990
1092
|
E_INVALID_FORMAT: {
|
|
@@ -992,7 +1094,8 @@ var ERRORS = {
|
|
|
992
1094
|
http_status: 400,
|
|
993
1095
|
title: "Invalid Format",
|
|
994
1096
|
description: "Receipt does not conform to JWS format",
|
|
995
|
-
|
|
1097
|
+
retryable: false,
|
|
1098
|
+
next_action: "retry_with_different_input",
|
|
996
1099
|
category: "validation"
|
|
997
1100
|
},
|
|
998
1101
|
E_INVALID_ISSUER: {
|
|
@@ -1000,7 +1103,8 @@ var ERRORS = {
|
|
|
1000
1103
|
http_status: 400,
|
|
1001
1104
|
title: "Invalid Issuer",
|
|
1002
1105
|
description: "Receipt issuer claim is invalid or untrusted",
|
|
1003
|
-
|
|
1106
|
+
retryable: false,
|
|
1107
|
+
next_action: "retry_with_different_input",
|
|
1004
1108
|
category: "validation"
|
|
1005
1109
|
},
|
|
1006
1110
|
E_INVALID_RAIL: {
|
|
@@ -1008,7 +1112,8 @@ var ERRORS = {
|
|
|
1008
1112
|
http_status: 400,
|
|
1009
1113
|
title: "Invalid Payment Rail",
|
|
1010
1114
|
description: "Payment rail identifier is not recognized",
|
|
1011
|
-
|
|
1115
|
+
retryable: false,
|
|
1116
|
+
next_action: "retry_with_different_input",
|
|
1012
1117
|
category: "validation"
|
|
1013
1118
|
},
|
|
1014
1119
|
E_INVALID_RECEIPT_ID: {
|
|
@@ -1016,7 +1121,8 @@ var ERRORS = {
|
|
|
1016
1121
|
http_status: 400,
|
|
1017
1122
|
title: "Invalid Receipt ID",
|
|
1018
1123
|
description: "Receipt ID (rid) does not match expected value",
|
|
1019
|
-
|
|
1124
|
+
retryable: false,
|
|
1125
|
+
next_action: "retry_with_different_input",
|
|
1020
1126
|
category: "validation"
|
|
1021
1127
|
},
|
|
1022
1128
|
E_INVALID_SUBJECT: {
|
|
@@ -1024,7 +1130,8 @@ var ERRORS = {
|
|
|
1024
1130
|
http_status: 400,
|
|
1025
1131
|
title: "Invalid Subject",
|
|
1026
1132
|
description: "Receipt subject claim does not match expected value",
|
|
1027
|
-
|
|
1133
|
+
retryable: false,
|
|
1134
|
+
next_action: "retry_with_different_input",
|
|
1028
1135
|
category: "validation"
|
|
1029
1136
|
},
|
|
1030
1137
|
E_MISSING_EXP: {
|
|
@@ -1032,7 +1139,8 @@ var ERRORS = {
|
|
|
1032
1139
|
http_status: 400,
|
|
1033
1140
|
title: "Missing Expiration",
|
|
1034
1141
|
description: "Receipt is missing required exp claim",
|
|
1035
|
-
|
|
1142
|
+
retryable: false,
|
|
1143
|
+
next_action: "retry_with_different_input",
|
|
1036
1144
|
category: "validation"
|
|
1037
1145
|
},
|
|
1038
1146
|
E_MISSING_REQUIRED_CLAIM: {
|
|
@@ -1040,7 +1148,8 @@ var ERRORS = {
|
|
|
1040
1148
|
http_status: 400,
|
|
1041
1149
|
title: "Missing Required Claim",
|
|
1042
1150
|
description: "Receipt is missing a required JWT claim",
|
|
1043
|
-
|
|
1151
|
+
retryable: false,
|
|
1152
|
+
next_action: "retry_with_different_input",
|
|
1044
1153
|
category: "validation"
|
|
1045
1154
|
},
|
|
1046
1155
|
E_NOT_YET_VALID: {
|
|
@@ -1048,7 +1157,8 @@ var ERRORS = {
|
|
|
1048
1157
|
http_status: 400,
|
|
1049
1158
|
title: "Not Yet Valid",
|
|
1050
1159
|
description: "Receipt nbf (not before) time is in the future",
|
|
1051
|
-
|
|
1160
|
+
retryable: true,
|
|
1161
|
+
next_action: "retry_after_delay",
|
|
1052
1162
|
category: "validation"
|
|
1053
1163
|
},
|
|
1054
1164
|
E_PARSE_ATTESTATION_INVALID: {
|
|
@@ -1056,7 +1166,8 @@ var ERRORS = {
|
|
|
1056
1166
|
http_status: 400,
|
|
1057
1167
|
title: "Attestation Receipt Invalid",
|
|
1058
1168
|
description: "Receipt classified as attestation but fails attestation schema validation",
|
|
1059
|
-
|
|
1169
|
+
retryable: false,
|
|
1170
|
+
next_action: "retry_with_different_input",
|
|
1060
1171
|
category: "validation"
|
|
1061
1172
|
},
|
|
1062
1173
|
E_PARSE_COMMERCE_INVALID: {
|
|
@@ -1064,7 +1175,8 @@ var ERRORS = {
|
|
|
1064
1175
|
http_status: 400,
|
|
1065
1176
|
title: "Commerce Receipt Invalid",
|
|
1066
1177
|
description: "Receipt has commerce fields (amt/cur/payment) but fails commerce schema validation",
|
|
1067
|
-
|
|
1178
|
+
retryable: false,
|
|
1179
|
+
next_action: "retry_with_different_input",
|
|
1068
1180
|
category: "validation"
|
|
1069
1181
|
},
|
|
1070
1182
|
E_PARSE_INVALID_INPUT: {
|
|
@@ -1072,7 +1184,8 @@ var ERRORS = {
|
|
|
1072
1184
|
http_status: 400,
|
|
1073
1185
|
title: "Parse Invalid Input",
|
|
1074
1186
|
description: "Input to receipt parser is not a non-null object",
|
|
1075
|
-
|
|
1187
|
+
retryable: false,
|
|
1188
|
+
next_action: "retry_with_different_input",
|
|
1076
1189
|
category: "validation"
|
|
1077
1190
|
},
|
|
1078
1191
|
// Verification error codes
|
|
@@ -1081,7 +1194,8 @@ var ERRORS = {
|
|
|
1081
1194
|
http_status: 400,
|
|
1082
1195
|
title: "Invalid Signature",
|
|
1083
1196
|
description: "Receipt signature verification failed",
|
|
1084
|
-
|
|
1197
|
+
retryable: false,
|
|
1198
|
+
next_action: "abort",
|
|
1085
1199
|
category: "verification"
|
|
1086
1200
|
},
|
|
1087
1201
|
E_KEY_NOT_FOUND: {
|
|
@@ -1089,7 +1203,8 @@ var ERRORS = {
|
|
|
1089
1203
|
http_status: 400,
|
|
1090
1204
|
title: "Key Not Found",
|
|
1091
1205
|
description: "Public key with specified kid not found in JWKS",
|
|
1092
|
-
|
|
1206
|
+
retryable: false,
|
|
1207
|
+
next_action: "retry_with_different_key",
|
|
1093
1208
|
category: "verification"
|
|
1094
1209
|
},
|
|
1095
1210
|
// Verifier error codes
|
|
@@ -1098,7 +1213,8 @@ var ERRORS = {
|
|
|
1098
1213
|
http_status: 400,
|
|
1099
1214
|
title: "Extension Too Large",
|
|
1100
1215
|
description: "Receipt extension data exceeds maximum size limit (64 KB)",
|
|
1101
|
-
|
|
1216
|
+
retryable: false,
|
|
1217
|
+
next_action: "abort",
|
|
1102
1218
|
category: "verifier"
|
|
1103
1219
|
},
|
|
1104
1220
|
E_VERIFY_INSECURE_SCHEME_BLOCKED: {
|
|
@@ -1106,7 +1222,8 @@ var ERRORS = {
|
|
|
1106
1222
|
http_status: 403,
|
|
1107
1223
|
title: "Insecure Scheme Blocked",
|
|
1108
1224
|
description: "Non-HTTPS URL encountered during issuer discovery (issuer URL or jwks_uri)",
|
|
1109
|
-
|
|
1225
|
+
retryable: false,
|
|
1226
|
+
next_action: "abort",
|
|
1110
1227
|
category: "verifier"
|
|
1111
1228
|
},
|
|
1112
1229
|
E_VERIFY_INVALID_TRANSPORT: {
|
|
@@ -1114,7 +1231,8 @@ var ERRORS = {
|
|
|
1114
1231
|
http_status: 400,
|
|
1115
1232
|
title: "Invalid Transport",
|
|
1116
1233
|
description: "Multiple PEAC-Receipt or PEAC-Receipt-Pointer headers detected (ambiguous transport)",
|
|
1117
|
-
|
|
1234
|
+
retryable: false,
|
|
1235
|
+
next_action: "abort",
|
|
1118
1236
|
category: "verifier"
|
|
1119
1237
|
},
|
|
1120
1238
|
E_VERIFY_ISSUER_CONFIG_INVALID: {
|
|
@@ -1122,7 +1240,8 @@ var ERRORS = {
|
|
|
1122
1240
|
http_status: 502,
|
|
1123
1241
|
title: "Issuer Config Invalid",
|
|
1124
1242
|
description: "peac-issuer.json is not valid JSON or does not conform to issuer config schema",
|
|
1125
|
-
|
|
1243
|
+
retryable: false,
|
|
1244
|
+
next_action: "abort",
|
|
1126
1245
|
category: "verifier"
|
|
1127
1246
|
},
|
|
1128
1247
|
E_VERIFY_ISSUER_CONFIG_MISSING: {
|
|
@@ -1130,7 +1249,8 @@ var ERRORS = {
|
|
|
1130
1249
|
http_status: 502,
|
|
1131
1250
|
title: "Issuer Config Missing",
|
|
1132
1251
|
description: "peac-issuer.json not found or not fetchable at issuer origin",
|
|
1133
|
-
|
|
1252
|
+
retryable: true,
|
|
1253
|
+
next_action: "retry_after_delay",
|
|
1134
1254
|
category: "verifier"
|
|
1135
1255
|
},
|
|
1136
1256
|
E_VERIFY_ISSUER_MISMATCH: {
|
|
@@ -1138,7 +1258,8 @@ var ERRORS = {
|
|
|
1138
1258
|
http_status: 403,
|
|
1139
1259
|
title: "Issuer Mismatch",
|
|
1140
1260
|
description: "issuer field in peac-issuer.json does not match the expected issuer origin",
|
|
1141
|
-
|
|
1261
|
+
retryable: false,
|
|
1262
|
+
next_action: "abort",
|
|
1142
1263
|
category: "verifier"
|
|
1143
1264
|
},
|
|
1144
1265
|
E_VERIFY_ISSUER_NOT_ALLOWED: {
|
|
@@ -1146,7 +1267,8 @@ var ERRORS = {
|
|
|
1146
1267
|
http_status: 403,
|
|
1147
1268
|
title: "Issuer Not Allowed",
|
|
1148
1269
|
description: "Receipt issuer is not in the verifier policy allowlist",
|
|
1149
|
-
|
|
1270
|
+
retryable: false,
|
|
1271
|
+
next_action: "abort",
|
|
1150
1272
|
category: "verifier"
|
|
1151
1273
|
},
|
|
1152
1274
|
E_VERIFY_JWKS_INVALID: {
|
|
@@ -1154,7 +1276,8 @@ var ERRORS = {
|
|
|
1154
1276
|
http_status: 502,
|
|
1155
1277
|
title: "JWKS Invalid",
|
|
1156
1278
|
description: "JWKS response is not valid JSON or missing required keys array",
|
|
1157
|
-
|
|
1279
|
+
retryable: false,
|
|
1280
|
+
next_action: "abort",
|
|
1158
1281
|
category: "verifier"
|
|
1159
1282
|
},
|
|
1160
1283
|
E_VERIFY_JWKS_TOO_LARGE: {
|
|
@@ -1162,7 +1285,8 @@ var ERRORS = {
|
|
|
1162
1285
|
http_status: 400,
|
|
1163
1286
|
title: "JWKS Too Large",
|
|
1164
1287
|
description: "JWKS response exceeds maximum size limit (64 KB)",
|
|
1165
|
-
|
|
1288
|
+
retryable: false,
|
|
1289
|
+
next_action: "abort",
|
|
1166
1290
|
category: "verifier"
|
|
1167
1291
|
},
|
|
1168
1292
|
E_VERIFY_JWKS_TOO_MANY_KEYS: {
|
|
@@ -1170,7 +1294,8 @@ var ERRORS = {
|
|
|
1170
1294
|
http_status: 400,
|
|
1171
1295
|
title: "JWKS Too Many Keys",
|
|
1172
1296
|
description: "JWKS contains more than maximum allowed keys (20)",
|
|
1173
|
-
|
|
1297
|
+
retryable: false,
|
|
1298
|
+
next_action: "abort",
|
|
1174
1299
|
category: "verifier"
|
|
1175
1300
|
},
|
|
1176
1301
|
E_VERIFY_JWKS_URI_INVALID: {
|
|
@@ -1178,7 +1303,8 @@ var ERRORS = {
|
|
|
1178
1303
|
http_status: 502,
|
|
1179
1304
|
title: "JWKS URI Invalid",
|
|
1180
1305
|
description: "jwks_uri in peac-issuer.json is not a valid HTTPS URL",
|
|
1181
|
-
|
|
1306
|
+
retryable: false,
|
|
1307
|
+
next_action: "abort",
|
|
1182
1308
|
category: "verifier"
|
|
1183
1309
|
},
|
|
1184
1310
|
E_VERIFY_KEY_FETCH_BLOCKED: {
|
|
@@ -1186,7 +1312,8 @@ var ERRORS = {
|
|
|
1186
1312
|
http_status: 403,
|
|
1187
1313
|
title: "Key Fetch Blocked",
|
|
1188
1314
|
description: "JWKS discovery blocked by SSRF protection (private IP, non-HTTPS, or blocked redirect)",
|
|
1189
|
-
|
|
1315
|
+
retryable: false,
|
|
1316
|
+
next_action: "abort",
|
|
1190
1317
|
category: "verifier"
|
|
1191
1318
|
},
|
|
1192
1319
|
E_VERIFY_KEY_FETCH_FAILED: {
|
|
@@ -1194,7 +1321,8 @@ var ERRORS = {
|
|
|
1194
1321
|
http_status: 502,
|
|
1195
1322
|
title: "Key Fetch Failed",
|
|
1196
1323
|
description: "Network error while fetching JWKS from issuer",
|
|
1197
|
-
|
|
1324
|
+
retryable: true,
|
|
1325
|
+
next_action: "retry_after_delay",
|
|
1198
1326
|
category: "verifier"
|
|
1199
1327
|
},
|
|
1200
1328
|
E_VERIFY_KEY_FETCH_TIMEOUT: {
|
|
@@ -1202,7 +1330,8 @@ var ERRORS = {
|
|
|
1202
1330
|
http_status: 504,
|
|
1203
1331
|
title: "Key Fetch Timeout",
|
|
1204
1332
|
description: "JWKS discovery timed out (5 second limit)",
|
|
1205
|
-
|
|
1333
|
+
retryable: true,
|
|
1334
|
+
next_action: "retry_after_delay",
|
|
1206
1335
|
category: "verifier"
|
|
1207
1336
|
},
|
|
1208
1337
|
E_VERIFY_MALFORMED_RECEIPT: {
|
|
@@ -1210,7 +1339,8 @@ var ERRORS = {
|
|
|
1210
1339
|
http_status: 400,
|
|
1211
1340
|
title: "Malformed Receipt",
|
|
1212
1341
|
description: "Cannot parse receipt as JWS Compact Serialization",
|
|
1213
|
-
|
|
1342
|
+
retryable: false,
|
|
1343
|
+
next_action: "abort",
|
|
1214
1344
|
category: "verifier"
|
|
1215
1345
|
},
|
|
1216
1346
|
E_VERIFY_POINTER_DIGEST_MISMATCH: {
|
|
@@ -1218,7 +1348,8 @@ var ERRORS = {
|
|
|
1218
1348
|
http_status: 400,
|
|
1219
1349
|
title: "Pointer Digest Mismatch",
|
|
1220
1350
|
description: "Fetched receipt SHA-256 digest does not match pointer declaration",
|
|
1221
|
-
|
|
1351
|
+
retryable: false,
|
|
1352
|
+
next_action: "abort",
|
|
1222
1353
|
category: "verifier"
|
|
1223
1354
|
},
|
|
1224
1355
|
E_VERIFY_POINTER_FETCH_BLOCKED: {
|
|
@@ -1226,7 +1357,8 @@ var ERRORS = {
|
|
|
1226
1357
|
http_status: 403,
|
|
1227
1358
|
title: "Pointer Fetch Blocked",
|
|
1228
1359
|
description: "Pointer URL fetch blocked by SSRF protection (private IP, non-HTTPS, or blocked redirect)",
|
|
1229
|
-
|
|
1360
|
+
retryable: false,
|
|
1361
|
+
next_action: "abort",
|
|
1230
1362
|
category: "verifier"
|
|
1231
1363
|
},
|
|
1232
1364
|
E_VERIFY_POINTER_FETCH_FAILED: {
|
|
@@ -1234,7 +1366,8 @@ var ERRORS = {
|
|
|
1234
1366
|
http_status: 502,
|
|
1235
1367
|
title: "Pointer Fetch Failed",
|
|
1236
1368
|
description: "Network error while fetching receipt from pointer URL",
|
|
1237
|
-
|
|
1369
|
+
retryable: true,
|
|
1370
|
+
next_action: "retry_after_delay",
|
|
1238
1371
|
category: "verifier"
|
|
1239
1372
|
},
|
|
1240
1373
|
E_VERIFY_POINTER_FETCH_TIMEOUT: {
|
|
@@ -1242,7 +1375,8 @@ var ERRORS = {
|
|
|
1242
1375
|
http_status: 504,
|
|
1243
1376
|
title: "Pointer Fetch Timeout",
|
|
1244
1377
|
description: "Pointer URL fetch timed out (5 second limit)",
|
|
1245
|
-
|
|
1378
|
+
retryable: true,
|
|
1379
|
+
next_action: "retry_after_delay",
|
|
1246
1380
|
category: "verifier"
|
|
1247
1381
|
},
|
|
1248
1382
|
E_VERIFY_POINTER_FETCH_TOO_LARGE: {
|
|
@@ -1250,7 +1384,8 @@ var ERRORS = {
|
|
|
1250
1384
|
http_status: 413,
|
|
1251
1385
|
title: "Pointer Fetch Too Large",
|
|
1252
1386
|
description: "Pointer URL response exceeds maximum size limit (256 KB)",
|
|
1253
|
-
|
|
1387
|
+
retryable: false,
|
|
1388
|
+
next_action: "abort",
|
|
1254
1389
|
category: "verifier"
|
|
1255
1390
|
},
|
|
1256
1391
|
E_VERIFY_POLICY_VIOLATION: {
|
|
@@ -1258,7 +1393,8 @@ var ERRORS = {
|
|
|
1258
1393
|
http_status: 403,
|
|
1259
1394
|
title: "Policy Violation",
|
|
1260
1395
|
description: "Receipt violates verifier trust policy",
|
|
1261
|
-
|
|
1396
|
+
retryable: false,
|
|
1397
|
+
next_action: "abort",
|
|
1262
1398
|
category: "verifier"
|
|
1263
1399
|
},
|
|
1264
1400
|
E_VERIFY_RECEIPT_TOO_LARGE: {
|
|
@@ -1266,7 +1402,8 @@ var ERRORS = {
|
|
|
1266
1402
|
http_status: 413,
|
|
1267
1403
|
title: "Receipt Too Large",
|
|
1268
1404
|
description: "Receipt exceeds maximum size limit (256 KB)",
|
|
1269
|
-
|
|
1405
|
+
retryable: false,
|
|
1406
|
+
next_action: "abort",
|
|
1270
1407
|
category: "verifier"
|
|
1271
1408
|
},
|
|
1272
1409
|
E_VERIFY_SCHEMA_INVALID: {
|
|
@@ -1274,7 +1411,8 @@ var ERRORS = {
|
|
|
1274
1411
|
http_status: 400,
|
|
1275
1412
|
title: "Schema Invalid",
|
|
1276
1413
|
description: "Receipt claims do not conform to expected schema",
|
|
1277
|
-
|
|
1414
|
+
retryable: false,
|
|
1415
|
+
next_action: "abort",
|
|
1278
1416
|
category: "verifier"
|
|
1279
1417
|
},
|
|
1280
1418
|
// Workflow error codes
|
|
@@ -1283,7 +1421,8 @@ var ERRORS = {
|
|
|
1283
1421
|
http_status: 400,
|
|
1284
1422
|
title: "Invalid Workflow Context",
|
|
1285
1423
|
description: "Workflow context does not conform to WorkflowContextSchema",
|
|
1286
|
-
|
|
1424
|
+
retryable: false,
|
|
1425
|
+
next_action: "retry_with_different_input",
|
|
1287
1426
|
category: "workflow"
|
|
1288
1427
|
},
|
|
1289
1428
|
E_WORKFLOW_CYCLE_DETECTED: {
|
|
@@ -1291,7 +1430,8 @@ var ERRORS = {
|
|
|
1291
1430
|
http_status: 400,
|
|
1292
1431
|
title: "Workflow Cycle Detected",
|
|
1293
1432
|
description: "Workflow DAG contains a cycle (not acyclic)",
|
|
1294
|
-
|
|
1433
|
+
retryable: false,
|
|
1434
|
+
next_action: "retry_with_different_input",
|
|
1295
1435
|
category: "workflow"
|
|
1296
1436
|
},
|
|
1297
1437
|
E_WORKFLOW_DAG_INVALID: {
|
|
@@ -1299,7 +1439,8 @@ var ERRORS = {
|
|
|
1299
1439
|
http_status: 400,
|
|
1300
1440
|
title: "Invalid Workflow DAG",
|
|
1301
1441
|
description: "Workflow DAG semantics violated (self-parent, duplicate parents, or cycle detected)",
|
|
1302
|
-
|
|
1442
|
+
retryable: false,
|
|
1443
|
+
next_action: "retry_with_different_input",
|
|
1303
1444
|
category: "workflow"
|
|
1304
1445
|
},
|
|
1305
1446
|
E_WORKFLOW_ID_INVALID: {
|
|
@@ -1307,7 +1448,8 @@ var ERRORS = {
|
|
|
1307
1448
|
http_status: 400,
|
|
1308
1449
|
title: "Invalid Workflow ID",
|
|
1309
1450
|
description: "Workflow ID does not match required format (wf_{ulid|uuid})",
|
|
1310
|
-
|
|
1451
|
+
retryable: false,
|
|
1452
|
+
next_action: "retry_with_different_input",
|
|
1311
1453
|
category: "workflow"
|
|
1312
1454
|
},
|
|
1313
1455
|
E_WORKFLOW_LIMIT_EXCEEDED: {
|
|
@@ -1315,7 +1457,8 @@ var ERRORS = {
|
|
|
1315
1457
|
http_status: 400,
|
|
1316
1458
|
title: "Workflow Limit Exceeded",
|
|
1317
1459
|
description: "Workflow exceeds defined limits (parent count, ID length, etc.)",
|
|
1318
|
-
|
|
1460
|
+
retryable: false,
|
|
1461
|
+
next_action: "retry_with_different_input",
|
|
1319
1462
|
category: "workflow"
|
|
1320
1463
|
},
|
|
1321
1464
|
E_WORKFLOW_PARENT_NOT_FOUND: {
|
|
@@ -1323,7 +1466,8 @@ var ERRORS = {
|
|
|
1323
1466
|
http_status: 400,
|
|
1324
1467
|
title: "Parent Step Not Found",
|
|
1325
1468
|
description: "Referenced parent step ID does not exist in the workflow",
|
|
1326
|
-
|
|
1469
|
+
retryable: false,
|
|
1470
|
+
next_action: "retry_with_different_input",
|
|
1327
1471
|
category: "workflow"
|
|
1328
1472
|
},
|
|
1329
1473
|
E_WORKFLOW_STEP_ID_INVALID: {
|
|
@@ -1331,7 +1475,8 @@ var ERRORS = {
|
|
|
1331
1475
|
http_status: 400,
|
|
1332
1476
|
title: "Invalid Step ID",
|
|
1333
1477
|
description: "Step ID does not match required format (step_{ulid|uuid})",
|
|
1334
|
-
|
|
1478
|
+
retryable: false,
|
|
1479
|
+
next_action: "retry_with_different_input",
|
|
1335
1480
|
category: "workflow"
|
|
1336
1481
|
},
|
|
1337
1482
|
E_WORKFLOW_SUMMARY_INVALID: {
|
|
@@ -1339,15 +1484,16 @@ var ERRORS = {
|
|
|
1339
1484
|
http_status: 400,
|
|
1340
1485
|
title: "Invalid Workflow Summary",
|
|
1341
1486
|
description: "Workflow summary attestation does not conform to schema",
|
|
1342
|
-
|
|
1487
|
+
retryable: false,
|
|
1488
|
+
next_action: "retry_with_different_input",
|
|
1343
1489
|
category: "workflow"
|
|
1344
1490
|
}
|
|
1345
1491
|
};
|
|
1346
1492
|
function getError(code) {
|
|
1347
1493
|
return ERRORS[code];
|
|
1348
1494
|
}
|
|
1349
|
-
function
|
|
1350
|
-
return ERRORS[code]?.
|
|
1495
|
+
function isRetryable(code) {
|
|
1496
|
+
return ERRORS[code]?.retryable ?? false;
|
|
1351
1497
|
}
|
|
1352
1498
|
var BUNDLE_ERRORS = {
|
|
1353
1499
|
DUPLICATE_RECEIPT: "E_BUNDLE_DUPLICATE_RECEIPT",
|
|
@@ -1388,6 +1534,6 @@ exports.DISPUTE_ERRORS = DISPUTE_ERRORS;
|
|
|
1388
1534
|
exports.ERRORS = ERRORS;
|
|
1389
1535
|
exports.ERROR_CODES = ERROR_CODES;
|
|
1390
1536
|
exports.getError = getError;
|
|
1391
|
-
exports.
|
|
1537
|
+
exports.isRetryable = isRetryable;
|
|
1392
1538
|
//# sourceMappingURL=errors.cjs.map
|
|
1393
1539
|
//# sourceMappingURL=errors.cjs.map
|