MCPcopy
hub / github.com/cortexlabs/cortex / ErrorInvalidYAML

Function ErrorInvalidYAML

pkg/lib/configreader/errors.go:102–108  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

100}
101
102func ErrorInvalidYAML(err error) error {
103 str := strings.TrimPrefix(errors.Message(err), "yaml: ")
104 return errors.WithStack(&errors.Error{
105 Kind: ErrInvalidYAML,
106 Message: fmt.Sprintf("invalid yaml: %s", str),
107 })
108}
109
110func ErrorTooLong(provided string, maxLen int) error {
111 return errors.WithStack(&errors.Error{

Callers 1

ReadYAMLBytesFunction · 0.85

Calls 2

MessageFunction · 0.92
WithStackFunction · 0.92

Tested by

no test coverage detected