Skip to content
中文

ProviderErrorCapture ​

SUPPORT · interface · Type contract

Captured upstream error body and whether it had to be truncated.

Import ​

ts
import type { ProviderErrorCapture } from '@jangts/agent-core/support';
js
/** @typedef {import('@jangts/agent-core/support').ProviderErrorCapture} ProviderErrorCapture */

Other public entry points:@jangts/agent-core/types, @jangts/agent-core/structs, @jangts/agent-core/support, @jangts/agent-core/support/model.

Definition ​

ts
interface ProviderErrorCapture

Field structure ​

FieldTypeRequiredDescription
bodystringRequiredSee the type definition and usage context.
truncatedbooleanRequiredSee the type definition and usage context.

Using the type ​

Read the contract at the call site ​

ts
import type { ProviderErrorCapture } from '@jangts/agent-core/support';

// Keep the original contract at the call site; TS and JS share the same runtime behavior.
function inspect(value: ProviderErrorCapture) {
  return value.body;
}
js
/** @param {import('@jangts/agent-core/support').ProviderErrorCapture} value */
function inspect(value) {
  return value.body;
}

API reference, usage examples and developer guides.