CorjReportBase: {
    $schema?: CorjSchemaLink;
    as_json?: CorjJsonValue | null;
    as_json_format?: CorjAsJsonFormat;
    as_string?: string | null;
    as_string_format?: CorjAsStringFormat;
    children_omitted?: CorjChildrenOmitted;
    children_sources?: string[];
    constructor_name?: string | null;
    instanceof_error?: boolean;
    message?: string | null;
    stack?: string | string[] | null;
    truncated?: true;
    typeof?: CorjTypeof;
    v?: CorjVersion;
}

Fields shared by the root report and every child report.

With omitExpectedValues (the default) a field holding its expected value is left out, see CORJ_EXPECTED_VALUES: a missing field means the expected value, null means producing the value failed. restoreExpectedValues fills them back in.

Type declaration

  • Optional $schema?: CorjSchemaLink

    Root only. Link to the JSON Schema of this report, controlled by the metadata option.

  • Optional as_json?: CorjJsonValue | null

    JSON form of caught without the children_sources properties, see as_json_format; null when it has no JSON form or producing it threw. Cut values end with CORJ_TRUNCATED_MARKER. Omitted when {}.

  • Optional as_json_format?: CorjAsJsonFormat

    Omitted when "safe-stable-stringify-with-length-limit".

  • Optional as_string?: string | null

    String form of caught, see as_string_format; null when producing it threw. Omitted when it equals the first line of stack.

  • Optional as_string_format?: CorjAsStringFormat

    Omitted when "String".

  • Optional children_omitted?: CorjChildrenOmitted

    Present when this node has child sources that were not reported.

  • Optional children_sources?: string[]

    Root only. The properties children were collected from. Omitted when ["cause", "errors"].

  • Optional constructor_name?: string | null

    caught.constructor.name when it is a string; null when reading it threw. Omitted together with as_string and message when the first stack line is "<constructor_name>: <message>".

  • Optional instanceof_error?: boolean

    caught instanceof Error. Omitted when true.

  • Optional message?: string | null

    caught.message when it is a string; null when reading it threw. Omitted as described for constructor_name.

  • Optional stack?: string | string[] | null

    caught.stack when it is a string, split into lines by default (stackFormat); null when reading it threw.

  • Optional truncated?: true

    Present when content or child reports were cut to meet maxReportSize. On a root it covers the whole report.

  • Optional typeof?: CorjTypeof

    typeof caught. Omitted when "object".

  • Optional v?: CorjVersion

    Root only. Report version, controlled by the metadata option.