MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / errorIsJSONFormat

Function errorIsJSONFormat

internal/schemavalidators/schemavalidators.go:616–622  ·  view source on GitHub ↗

errorIsJSONFormat checks if the error is a JSON format error.

(err error)

Source from the content-addressed store, hash-verified

614
615// errorIsJSONFormat checks if the error is a JSON format error.
616func errorIsJSONFormat(err error) error {
617 var invalidJSONTypeError jsonschema.InvalidJSONTypeError
618 if errors.As(err, &invalidJSONTypeError) {
619 return ErrInvalidJSONPayload
620 }
621 return nil
622}

Callers 3

ValidateCSAFFunction · 0.85
ValidateOpenAPIFunction · 0.85
ValidateAsyncAPIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected