Skip to content

ResultError ​

ResultError ​

Exception form of a Micro509Error: a branded Error carrying the structured code, message, and any details.

Thrown by unwrap for a failed result and by throwMicro509Error when a builder rejects invalid construction input. Detect with isResultError.

ts
interface ResultError<TError extends Micro509Error<string, unknown>> extends Error {
	readonly code: TError["code"];
	readonly error: TError;
}

Properties

  • readonly code: TError["code"] — Machine-readable failure reason, mirrored from error.code.
  • readonly error: TError — The structured error payload that produced this exception.

Released under the MIT License.