function parseSessionFailure
parseSessionFailure(failureData: EnvKeyEncrypted | ""): Promise<StoredPaymentFailure | null>

Parse a stored terminal failure, or null when the row carries none. We only ever write valid encrypted JSON (via markSessionFailed), but a value that won't decrypt or parse (restore, manual edit, rotated key) must not crash the replay path — it degrades to a generic terminal failure so the session still resolves instead of looping.

Parameters

failureData: EnvKeyEncrypted | ""

Return Type

Promise<StoredPaymentFailure | null>

Usage

import { parseSessionFailure } from "docs/database.ts";