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

Function cryptoForbiddenEncode

packages/effect/src/Schema.ts:14457–14464  ·  view source on GitHub ↗
(name: string, key: unknown, options: SchemaAST.ParseOptions)

Source from the content-addressed store, hash-verified

14455 new SchemaIssue.InvalidValue({ message: error.message, cause: error }, input, options)
14456
14457const cryptoForbiddenEncode = (name: string, key: unknown, options: SchemaAST.ParseOptions) =>
14458 Effect.fail(
14459 new SchemaIssue.Forbidden(
14460 { message: `Schema.${name} only decodes, pass { allowEncode: true } to encode the key` },
14461 key,
14462 options
14463 )
14464 )
14465
14466type CryptoKeyOptions = { readonly allowEncode?: boolean | undefined }
14467

Callers 2

cryptoKeyFromBytesFunction · 0.85
cryptoKeyFromFormatFunction · 0.85

Calls 1

failMethod · 0.65

Tested by

no test coverage detected