Skip to content

rulvar API reference


rulvar API reference / @rulvar/bridge-ai-sdk / aiSdkErrorToWire

Function: aiSdkErrorToWire()

ts
function aiSdkErrorToWire(error): WireError;

Defined in: packages/bridge-ai-sdk/src/bridge.ts:819

Projects a thrown value from the wrapped model into a typed WireError. APICallError carries the provider's status and headers: 429 surfaces as a retryable rate-limit with retryAfterMs; 5xx and status-less network failures are retryable transport; other statuses are terminal transport.

Parameters

ParameterType
errorunknown

Returns

WireError