Provides a NestJS exception filter handling HTTP and unknown errors.
// Source: https://github.com/nestjs/nest | License: MIT | Copyright 2017-present Kamil Mysliwiec <https://kamilmysliwiec.com>
// Provided via justclaw.it.com; keep this notice with the code.
import {
type ArgumentsHost,
type ExceptionFilter,
HttpException,
type HttpServer,
HttpStatus,
Inject,
IntrinsicException,
Logger,
Optional,
} from '@nestjs/common';
import { STATUS_CODES } from 'http';
import { AbstractHttpAdapter } from '../adapters/index.js';
import { MESSAGES } from '../constants.js';
import { HttpAdapterHost } from '../helpers/http-adapter-host.js';
import { isObject } from '@nestjs/common/internal';
export class BaseExceptionFilter<T = any> implements ExceptionFilter<T> {
private static readonly logger = new Logger('ExceptionsHandler');
@Optional()
@Inj
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key