# PlatformExceptionsMiddleware Class middleware platform
Module | import { PlatformExceptionsMiddleware } from "@tsed/common" |
---|---|
Source | /packages/common/src/platform-exceptions/middlewares/PlatformExceptionsMiddleware.ts |
# Overview
class PlatformExceptionsMiddleware implements IMiddleware {
middleware: GlobalErrorHandlerMiddleware;
types: Map<import("@tsed/core").Type<any> | Symbol, import("..").ExceptionFilterMethods<unknown>>;
use(error: any, ctx: Context): any;
}
# Description
Catch all errors and return the json error with the right status code when it's possible.
# Members
middleware: GlobalErrorHandlerMiddleware;
types: Map<import("@tsed/core").Type<any> | Symbol, import("..").ExceptionFilterMethods<unknown>>;
use(error: any, ctx: Context): any;
- Session & cookies
- Passport.js
- TypeORM
- Mongoose
- GraphQL
- Socket.io
- Swagger
- AJV
- Multer
- Serve static files
- Templating
- Throw HTTP Exceptions
- Customize 404
- AWS
- Jest
- Seq
- Controllers
- Providers
- Model
- Converters
- Middlewares
- Pipes
- Interceptors
- Authentication
- Hooks
- Injection scopes
- Custom providers
- Custom endpoint decorator
- Testing