@nova-ts/core
Version:
A serverside framework used to build scalable application
26 lines (23 loc) • 967 B
TypeScript
import { NovaRequest } from '../Abstract/NovaRequest.js';
import { NovaResponse } from '../Abstract/NovaResponse.js';
import 'express';
/**
* Central resolver responsible for handling exceptions thrown during request processing.
*
* This class looks up the appropriate exception handler registered via `@ExceptionHandler`
* and invokes it with the given error, request, and response.
*/
declare class NovaExceptionResolver {
/**
* Resolves the given error by invoking a matching exception handler if registered.
*
* If no handler is registered for the specific exception type, it sends a generic
* 500 response with the error message.
*
* @param err - The error that was thrown during request handling.
* @param request - The current Nova request object.
* @param response - The current Nova response object.
*/
static resolve(err: any, request: NovaRequest, response: NovaResponse): any;
}
export { NovaExceptionResolver };