/** * Custom error classes for @push.rocks/smartserve */ /** * HTTP error with status code * Thrown from handlers to return specific HTTP responses */ export declare class HttpError extends Error { readonly status: number; readonly details?: Record; constructor(status: number, message: string, details?: Record); /** * Convert to HTTP Response */ toResponse(): Response; static badRequest(message?: string, details?: Record): HttpError; static unauthorized(message?: string, details?: Record): HttpError; static forbidden(message?: string, details?: Record): HttpError; static notFound(message?: string, details?: Record): HttpError; static methodNotAllowed(message?: string, details?: Record): HttpError; static conflict(message?: string, details?: Record): HttpError; static unprocessableEntity(message?: string, details?: Record): HttpError; static tooManyRequests(message?: string, details?: Record): HttpError; static internalServerError(message?: string, details?: Record): HttpError; static notImplemented(message?: string, details?: Record): HttpError; static badGateway(message?: string, details?: Record): HttpError; static serviceUnavailable(message?: string, details?: Record): HttpError; } /** * Error thrown when route is not found */ export declare class RouteNotFoundError extends HttpError { constructor(path: string, method: string); } /** * Error thrown when adapter is not supported */ export declare class UnsupportedRuntimeError extends Error { constructor(runtime: string); } /** * Error thrown when server is already running */ export declare class ServerAlreadyRunningError extends Error { constructor(); } /** * Error thrown when server is not running */ export declare class ServerNotRunningError extends Error { constructor(); } /** * Error thrown when WebSocket configuration is invalid */ export declare class WebSocketConfigError extends Error { constructor(message: string); }