CorjMakerOptions: {
    asJsonFormatsToApply: [CorjAsJsonFormat, ...CorjAsJsonFormat[]];
    asStringFormatsToApply: [CorjAsStringFormat, ...CorjAsStringFormat[]];
    childrenMetadataFields: boolean | CorjMakerOptionsMetadataFieldsConfig;
    childrenSources: string[];
    makeReportId: ((context) => string);
    maxChildrenLevel: number;
    metadataFields: boolean | CorjMakerOptionsMetadataFieldsConfig;
    onCaughtMaking: CorjMakerOnCaughtMakingCallbackFn | null;
    parseStackToArray: boolean;
    printWarningsOnUnhandledErrors: boolean;
}

Type declaration

  • asJsonFormatsToApply: [CorjAsJsonFormat, ...CorjAsJsonFormat[]]
  • asStringFormatsToApply: [CorjAsStringFormat, ...CorjAsStringFormat[]]
  • childrenMetadataFields: boolean | CorjMakerOptionsMetadataFieldsConfig
  • childrenSources: string[]

    Fields to use as children.

  • makeReportId: ((context) => string)
      • (context): string
      • Parameters

        • context: {
              caught: unknown;
              index: number;
              level: number;
              path: string;
          }
          • caught: unknown
          • index: number
          • level: number
          • path: string

        Returns string

  • maxChildrenLevel: number

    Controls how much levels of nested errors will be included. For example

    • 1 means caught.cause is included, but caught.cause.cause is not.
    • 2 means caught.cause.cause is included, but caught.cause.cause.cause is not.
  • metadataFields: boolean | CorjMakerOptionsMetadataFieldsConfig

    Controls adding metadata fields to report.

  • onCaughtMaking: CorjMakerOnCaughtMakingCallbackFn | null

    This function is called when CorjMaker.makeReportObject fails to produce along the way of producing a report.

  • parseStackToArray: boolean
  • printWarningsOnUnhandledErrors: boolean

    Print warning when onCaughtMaking is not set, or when onCaughtMaking itself threw an error.