@visa/cli 4.1.0-rc.291 → 4.1.0-rc.294

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.
@@ -243,6 +243,15 @@ export function classifyServerIntentFailure(err) {
243
243
  const terminalRead = status === 401 || status === 403 || status === 404;
244
244
  return { outcome: 'uncertain', resumable: !terminalRead };
245
245
  }
246
+ // #8981: this exact admission refusal is known to precede provider dispatch.
247
+ // Never generalize retryable:false or a 503 into evidence of non-creation.
248
+ if (status === 503 &&
249
+ errorCode === 'LEGACY_AGENT_ADMISSION_STOPPED' &&
250
+ retryable === false &&
251
+ bootstrapState === 'none' &&
252
+ outcome === 'not_created') {
253
+ return { outcome: 'not_created', resumable: false };
254
+ }
246
255
  if (retryable)
247
256
  return { outcome: 'not_created', resumable: true };
248
257
  if (status === 0 || status >= 500) {
@@ -47,7 +47,8 @@ export declare class ServerIntentError extends Error {
47
47
  readonly facts: {
48
48
  status: number;
49
49
  errorCode: string | null;
50
- retryable: boolean;
50
+ /** null: the route supplied no boolean retry advice. */
51
+ retryable: boolean | null;
51
52
  requestId: string | null;
52
53
  bootstrapState: ServerIntentBootstrapState;
53
54
  outcome: 'uncertain' | 'not_created' | 'unknown';
@@ -56,7 +57,8 @@ export declare class ServerIntentError extends Error {
56
57
  constructor(message: string, facts: {
57
58
  status: number;
58
59
  errorCode: string | null;
59
- retryable: boolean;
60
+ /** null: the route supplied no boolean retry advice. */
61
+ retryable: boolean | null;
60
62
  requestId: string | null;
61
63
  bootstrapState: ServerIntentBootstrapState;
62
64
  outcome: 'uncertain' | 'not_created' | 'unknown';
@@ -130,7 +130,7 @@ function serverIntentErrorFrom(res, doc) {
130
130
  return new ServerIntentError(`server intent failed (${res.status}): ${routeErrorMessage(res, doc)}`, {
131
131
  status: res.status,
132
132
  errorCode,
133
- retryable: doc?.retryable === true,
133
+ retryable: typeof doc?.retryable === 'boolean' ? doc.retryable : null,
134
134
  requestId: requestIdOf(res, doc),
135
135
  bootstrapState: bootstrapStateOf(doc?.bootstrap_state),
136
136
  outcome,