fix(ui): сохранить snapshot speed при неизвестном исходе записи
This commit is contained in:
1 parent
f408afba20
commit
96fa910804
8 files changed
+57
-4
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { ApiClientError } from "@/shared/api/http-client"
|
||||
|
||||
/** Preserve the last confirmed snapshot only for this operation's explicit unknown receipt. */
|
||||
export function isSpeedPersistenceUnknown(error: unknown, runId: string): boolean {
|
||||
if (!(error instanceof ApiClientError) || error.status !== 502) return false
|
||||
if (!error.payload || typeof error.payload !== "object") return false
|
||||
const payload = error.payload as { outcome?: unknown; runId?: unknown }
|
||||
return payload.outcome === "unknown" && payload.runId === runId
|
||||
}
|
||||
Reference in new issue
Block a user