MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isStorageFailure

Function isStorageFailure

packages/core/sdk/src/fuma-runtime.ts:192–196  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

190 code ? `FumaDB ${label} failed: ${code}` : `FumaDB ${label} failed`;
191
192export const isStorageFailure = (error: unknown): error is StorageFailure =>
193 Predicate.isTagged(error, "StorageError") ||
194 Predicate.isTagged(error, "CredentialWriteIncompleteError") ||
195 Predicate.isTagged(error, "StorageConnectionError") ||
196 Predicate.isTagged(error, "UniqueViolationError");
197
198export const fumaFailureFromCause = (label: string, cause: unknown): StorageFailure => {
199 if (isStorageFailure(cause)) return cause;

Callers 4

foldPluginFailureFunction · 0.90
fumaFailureFromCauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected