MCPcopy
hub / github.com/larksuite/cli / NewValidationError

Function NewValidationError

errs/types.go:108–116  ·  view source on GitHub ↗

NewValidationError constructs a *ValidationError with Category locked to CategoryValidation and Message formatted via fmt.Sprintf(format, args...).

(subtype Subtype, format string, args ...any)

Source from the content-addressed store, hash-verified

106// NewValidationError constructs a *ValidationError with Category locked to
107// CategoryValidation and Message formatted via fmt.Sprintf(format, args...).
108func NewValidationError(subtype Subtype, format string, args ...any) *ValidationError {
109 return &ValidationError{
110 Problem: Problem{
111 Category: CategoryValidation,
112 Subtype: subtype,
113 Message: formatMessage(format, args),
114 },
115 }
116}
117
118func (e *ValidationError) WithHint(format string, args ...any) *ValidationError {
119 e.Hint = formatMessage(format, args)

Callers 15

HandleResponseFunction · 0.92
classifySaveErrFunction · 0.92
buildStreamURLFunction · 0.92
CheckIdentityMethod · 0.92
CheckStrictModeMethod · 0.92
ValidateFileFlagFunction · 0.92
BuildFormdataFunction · 0.92
ParseLangFlagFunction · 0.92
ParseOptionalBodyFunction · 0.92
ParseJSONMapFunction · 0.92
jqFilterFunction · 0.92

Calls 1

formatMessageFunction · 0.85