MCPcopy Create free account
hub / github.com/arktypeio/arktype / invalidError

Function invalidError

ark/schema/shared/errors.ts:742–753  ·  view source on GitHub ↗
(
	{ data, path }: ArkIssue,
	config: ResolvedConfig
)

Source from the content-addressed store, hash-verified

740
741/** an issue errors "none" added, written in en as saying its data is invalid */
742export const invalidError = (
743 { data, path }: ArkIssue,
744 config: ResolvedConfig
745): ArkError => {
746 const error = errorOfContext(
747 { code: "predicate", ...invalidInput(), data } as never,
748 path,
749 config
750 )
751 writeError(error, config, renderer?.en ?? config.locale)
752 return error
753}
754
755const errorOfContext = (
756 input: ArkErrorContextInput,

Callers 1

issuesMethod · 0.90

Calls 3

errorOfContextFunction · 0.85
writeErrorFunction · 0.85
invalidInputFunction · 0.70

Tested by

no test coverage detected