Class ErrorSerializer<ErrorType>

The ErrorSerializer class is used to serialize errors.

Example:

[[include:error-serializer.example.ts]]

Type Parameters

Constructors

Properties

Methods

Constructors

Properties

options: Readonly<ErrorSerializerOptions<ErrorType>>

The set of options for the serializer.

defaultOptions: {
    attributes: {
        code: string;
        detail: string;
        id: string;
        source: {
            parameter: undefined;
            pointer: string;
        };
        status: string;
        title: string;
    };
    linkers: {};
    metaizers: {};
    version: string;
} = ...

Default options. Can be edited to change default options globally.

Type declaration

  • attributes: {
        code: string;
        detail: string;
        id: string;
        source: {
            parameter: undefined;
            pointer: string;
        };
        status: string;
        title: string;
    }
    • code: string
    • detail: string
    • id: string
    • source: {
          parameter: undefined;
          pointer: string;
      }
      • parameter: undefined
      • pointer: string
    • status: string
    • title: string
  • linkers: {}
    • metaizers: {}
      • version: string

      Methods

      Generated using TypeDoc