import { Context } from '../context.js'; import { MiddlewareProvider } from '../middleware/index.js'; import { ErrorHandlerProvider } from '../error/error-handler-provider.js'; import { Dispatcher } from './dispatcher-protocol.js'; import { Logger } from '@celljs/core'; import { HandlerExecutionChain, HandlerMapping } from '../handler/handler-protocol.js'; export declare class DispatcherImpl implements Dispatcher { protected handlerExecutionChain: HandlerExecutionChain; protected readonly handlerMapping: HandlerMapping; protected middlewareProvider: MiddlewareProvider; protected errorHandlerProvider: ErrorHandlerProvider; protected readonly logger: Logger; dispatch(ctx: Context): Promise; /** * Server errors with their stack at the error level. Client errors are answers, not failures, and only * go to the debug level: a 4xx `HttpError` (a 404 for an unknown path), or any error a handler answered * with a redirect or a 4xx (login required, access denied). */ protected logError(err: unknown, status?: number): void; /** * The handler with the highest priority that can handle the error answers; when its `handle` throws, * the next one is tried. When none answers, the response ends with a bare 500, so no request hangs. */ protected handleError(ctx: Context, err: Error): Promise; }