method BaseError.prototype.withTraceId
BaseError.prototype.withTraceId(traceId: string | undefined): this

Attach a trace ID if one was not captured when the error was created.

Parameters

traceId: string | undefined

Trace ID to attach to serialized error data.

Return Type

this

This error instance for chaining.

Usage

import { BaseError } from "result/mod.ts";