Skip to content
Français

quotaFault

import { quotaFault } from "@elie-laloum/outpost";

Return the message, resetAt and conversation of the first OutpostError with code quota in the error and up to seven wrapped causes, or undefined. Fallback agents and onQuota pauses use the same test. It does not wait or retry.

Complete example and detailed rules.

  • errorRequired
    unknown
    Any caught value, typically a rejection from dispatch, a task or a model provider.

QuotaFault | undefined

export declare function quotaFault(error: unknown): QuotaFault | undefined;