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

Function isStorageFailure

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

Source from the content-addressed store, hash-verified

174 code ? `FumaDB ${label} failed: ${code}` : `FumaDB ${label} failed`;
175
176export const isStorageFailure = (error: unknown): error is StorageFailure =>
177 Predicate.isTagged(error, "StorageError") ||
178 Predicate.isTagged(error, "StorageConnectionError") ||
179 Predicate.isTagged(error, "UniqueViolationError");
180
181export const fumaFailureFromCause = (label: string, cause: unknown): StorageFailure => {
182 if (isStorageFailure(cause)) return cause;

Callers 4

foldPluginFailureFunction · 0.90
fumaFailureFromCauseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected