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

Function isStorageFailure

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

Source from the content-addressed store, hash-verified

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

Callers 4

foldPluginFailureFunction · 0.90
fumaFailureFromCauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected