BellD / DevelopersDocumentation · latest

errors.ts

Source: sdk/typescript/src/errors.ts

export interface BellDProblem {
    code: string;
    reason?: string;
    correlation_id?: string;
    status?: number;
    type?: string;
    title?: string;
    detail?: string;
    instance?: string;
}
export declare class BellDCapabilityError extends Error {
    readonly code: string;
    readonly reason?: string;
    readonly correlation_id?: string;
    readonly status?: number;
    private readonly problem;
    constructor(problem: BellDProblem);
    /** Preserve proxy problem fields for a Product forwarding the error to its Consumer. */
    toProblem(): BellDProblem;
}
export declare function unavailable(detail: string): BellDCapabilityError;
export declare function parseProblem(body: string, status: number): BellDCapabilityError;