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 ProviderErrorCaptureField structure
| Field | Type | Required | Description |
|---|---|---|---|
body | string | Required | See the type definition and usage context. |
truncated | boolean | Required | See 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;
}