import type { Context } from '../context.js'; export declare class HttpError extends Error { status: number; code?: string; details?: any; constructor(status: number, message: string, code?: string, details?: any); } export declare class BadRequestError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class UnauthorizedError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class ForbiddenError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class NotFoundError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class MethodNotAllowedError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class ConflictError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class UnprocessableEntityError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class InternalServerError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class NotImplementedError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class BadGatewayError extends HttpError { constructor(message?: string, code?: string, details?: any); } export declare class ServiceUnavailableError extends HttpError { constructor(message?: string, code?: string, details?: any); } export interface ErrorHandlerOptions { exposeStack?: boolean; includeDetails?: boolean; transformError?: (error: Error, ctx: Context) => any; logErrors?: boolean; developmentMode?: boolean; customErrorPages?: boolean; suggestions?: boolean; } export declare function errorHandler(options?: ErrorHandlerOptions): (ctx: Context, next: () => Promise) => Promise; export declare function badRequest(message?: string, code?: string, details?: any): void; export declare function unauthorized(message?: string, code?: string, details?: any): void; export declare function forbidden(message?: string, code?: string, details?: any): void; export declare function notFound(message?: string, code?: string, details?: any): void; export declare function methodNotAllowed(message?: string, code?: string, details?: any): void; export declare function conflict(message?: string, code?: string, details?: any): void; export declare function unprocessableEntity(message?: string, code?: string, details?: any): void; export declare function internalServerError(message?: string, code?: string, details?: unknown): void; //# sourceMappingURL=errorHandler.d.ts.map