/** * Custom error class for API-related errors in the fuapi framework. * Extends the base Error class with an additional numeric error code for better error handling. * Used throughout the framework to provide structured error information with both HTTP status codes * and custom application error codes. * * @example * ```typescript * // Throwing an API error with HTTP status code * throw new APIError(404, 'User not found') * * // Catching and handling API errors * try { * await apiCall() * } catch (error) { * if (error instanceof APIError) { * console.log(`Error ${error.code}: ${error.message}`) * } * } * ``` */ export declare class APIError extends Error { readonly code: number; /** * Creates a new APIError instance. * * @param code - HTTP status code or custom error code (e.g., 404, 500, 403) * @param msg - Human-readable error message describing the error */ constructor(code: number, msg: string); } //# sourceMappingURL=APIError.d.ts.map