MCPcopy Create free account
hub / github.com/Effect-TS/effect / isJsonError

Function isJsonError

packages/effect/src/SchemaTransformation.ts:1081–1082  ·  view source on GitHub ↗
(input: unknown)

Source from the content-addressed store, hash-verified

1079}
1080
1081const isJsonError = (input: unknown): input is JsonError =>
1082 Predicate.isObject(input) && typeof input["message"] === "string"
1083
1084const decodeJsonError = (input: JsonError): Error => {
1085 const hasCause = Object.hasOwn(input, "cause")

Callers 1

decodeDefectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected