Skip to content

ResultError

Error thrown by unwrap when a result is a failure.

Carries the structured Micro509Error payload so callers using the throwing escape hatch still get the machine-readable code and any details.

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.