@tsed/platform-exceptions 6.95.9 → 6.96.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/platform-exceptions",
3
- "version": "6.95.9",
3
+ "version": "6.96.2",
4
4
  "description": "Platform exceptions module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -21,16 +21,16 @@
21
21
  "tslib": "2.2.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@tsed/core": "6.95.9",
25
- "@tsed/di": "6.95.9",
26
- "@tsed/exceptions": "6.95.9",
27
- "@tsed/schema": "6.95.9"
24
+ "@tsed/core": "6.96.2",
25
+ "@tsed/di": "6.96.2",
26
+ "@tsed/exceptions": "6.96.2",
27
+ "@tsed/schema": "6.96.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "@tsed/core": "^6.95.9",
31
- "@tsed/di": "^6.95.9",
32
- "@tsed/exceptions": "^6.95.9",
33
- "@tsed/schema": "^6.95.9"
30
+ "@tsed/core": "^6.96.2",
31
+ "@tsed/di": "^6.96.2",
32
+ "@tsed/exceptions": "^6.96.2",
33
+ "@tsed/schema": "^6.96.2"
34
34
  },
35
35
  "repository": "https://github.com/tsedio/tsed",
36
36
  "bugs": {
@@ -1,15 +0,0 @@
1
- import { Env } from "@tsed/core";
2
- import { BaseContext } from "@tsed/di";
3
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
4
- export declare class ErrorFilter implements ExceptionFilterMethods {
5
- catch(error: any, ctx: BaseContext): void;
6
- mapError(error: any, env?: Env): {
7
- name: any;
8
- message: any;
9
- status: any;
10
- errors: any;
11
- stack: any;
12
- };
13
- protected getErrors(error: any): any;
14
- protected getHeaders(error: any): any;
15
- }
@@ -1,6 +0,0 @@
1
- import { BaseContext } from "@tsed/di";
2
- import { Exception } from "@tsed/exceptions";
3
- import { ErrorFilter } from "./ErrorFilter";
4
- export declare class ExceptionFilter extends ErrorFilter {
5
- catch(error: Exception, ctx: BaseContext): void;
6
- }
@@ -1,5 +0,0 @@
1
- import { BaseContext } from "@tsed/di";
2
- import { ErrorFilter } from "./ErrorFilter";
3
- export declare class MongooseErrorFilter extends ErrorFilter {
4
- catch(error: Error, ctx: BaseContext): void;
5
- }
@@ -1,5 +0,0 @@
1
- import { BaseContext } from "@tsed/di";
2
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
3
- export declare class StringErrorFilter implements ExceptionFilterMethods {
4
- catch(error: string, ctx: BaseContext): void;
5
- }
@@ -1,7 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- /**
3
- * Register a new class to handle an specific exception.
4
- * @decorator
5
- * @param types
6
- */
7
- export declare function Catch(...types: (Type<Error | any> | string)[]): (target: any) => void;
@@ -1,14 +0,0 @@
1
- import { Type } from "@tsed/core";
2
- import type { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
3
- /**
4
- * @ignore
5
- */
6
- export declare type ExceptionFilterKey = Type<any> | Symbol | string;
7
- /**
8
- * @ignore
9
- */
10
- export declare const ExceptionFiltersContainer: Map<ExceptionFilterKey, Type<ExceptionFilterMethods<unknown>>>;
11
- /**
12
- * @ignore
13
- */
14
- export declare function registerExceptionType(type: ExceptionFilterKey, token: Type<ExceptionFilterMethods>): void;
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { NotFound } from "@tsed/exceptions";
2
- export declare class ResourceNotFound extends NotFound {
3
- readonly url: string;
4
- constructor(url: string);
5
- }
@@ -1,10 +0,0 @@
1
- export * from "./components/StringErrorFilter";
2
- export * from "./components/ExceptionFilter";
3
- export * from "./components/ErrorFilter";
4
- export * from "./components/MongooseErrorFilter";
5
- export * from "./decorators/catch";
6
- export * from "./domain/ExceptionFiltersContainer";
7
- export * from "./domain/ExceptionSchema";
8
- export * from "./interfaces/ExceptionFilterMethods";
9
- export * from "./services/PlatformExceptions";
10
- export * from "./errors/ResourceNotFound";
@@ -1,4 +0,0 @@
1
- import { BaseContext } from "@tsed/di";
2
- export interface ExceptionFilterMethods<T = unknown> {
3
- catch(error: T, ctx: BaseContext): void;
4
- }
@@ -1,15 +0,0 @@
1
- import { BaseContext, InjectorService } from "@tsed/di";
2
- import { ExceptionFilterKey } from "../domain/ExceptionFiltersContainer";
3
- import { ExceptionFilterMethods } from "../interfaces/ExceptionFilterMethods";
4
- /**
5
- * Catch all errors and return the json error with the right status code when it's possible.
6
- *
7
- * @platform
8
- */
9
- export declare class PlatformExceptions {
10
- types: Map<ExceptionFilterKey, ExceptionFilterMethods>;
11
- injector: InjectorService;
12
- $onInit(): void;
13
- catch(error: unknown, ctx: BaseContext): void;
14
- resourceNotFound(ctx: BaseContext): void;
15
- }