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