UNPKG

@arizeai/phoenix-client

Version:

A client for the Phoenix API

21 lines 736 B
/** * Type guard to check if an error is an HTTP error with a response status code. * This safely narrows the type without unsafe type assertions. * * @param error - The error to check * @returns True if the error has a response.status property */ export declare function isHttpError(error: unknown): error is { response: { status: number; }; }; /** * Safely checks if an error is an HTTP error with a specific status code. * * @param error - The error to check * @param statusCode - The status code to check for * @returns True if the error has the specified status code */ export declare function isHttpErrorWithStatus(error: unknown, statusCode: number): boolean; //# sourceMappingURL=isHttpError.d.ts.map