UNPKG

fetchero

Version:

_A type-safe, proxy-based HTTP & GraphQL client for modern applications._

34 lines (33 loc) 887 B
import { IErrors } from '../types/common'; /** * Utility class for error handling and formatting */ export declare class ErrorHandler { /** * Checks if the error indicates a "not found" status */ static isNotFound(errors: IErrors[]): boolean; /** * Formats error code with proper structure */ private static formatErrorCode; /** * Formats error message structure */ private static formatErrorMessage; /** * Formats complete error response with default messages */ private static formatErrorResponse; /** * Composes error formatting functions */ static compose(error: IErrors): IErrors; /** * Creates standardized error response */ static makeErrorResponse({ code, message, }: { message: string; code: number; }): IErrors; }