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

Function labelMessage

ark/schema/shared/errors.ts:1352–1357  ·  view source on GitHub ↗
(error: ArkError, locale: Locale.Info)

Source from the content-addressed store, hash-verified

1350 * message configured or supplied says what it says, so it's never labeled
1351 */
1352export const labelMessage = (error: ArkError, locale: Locale.Info): void => {
1353 const label = labelOfValue(error)
1354 if (label === undefined) return
1355 error.message = `${locale.verbatim(label)} ${error.message}`
1356 labeledIssue(error, label)
1357}
1358
1359/**
1360 * the label of the value an error is about: a missing key's value's, or the

Callers 2

writeFunction · 0.90
writeTextFunction · 0.85

Calls 2

labeledIssueFunction · 0.90
labelOfValueFunction · 0.85

Tested by

no test coverage detected