Skip to content
Français

recoveryDetails

import { recoveryDetails } from "@elie-laloum/outpost";

Return the recovery record Outpost attached to a thrown value: where work survived, such as branch, directory, commits, transcript, logReference or conversation. Works on any thrown object, including a plain Error or an abort reason. Returns an empty object for an OutpostError without a record and undefined for any other value without one.

Complete example and detailed rules.

  • errorRequired
    unknown
    Unknown thrown value from which to extract Outpost recovery metadata.

Readonly<Record<string, unknown>> | undefined

export declare function recoveryDetails(
  error: unknown,
): Readonly<Record<string, unknown>> | undefined;