MCPcopy Index your code
hub / github.com/cortexproject/cortex / DecorateWithParamName

Function DecorateWithParamName

pkg/api/queryapi/util.go:114–120  ·  view source on GitHub ↗
(err error, field string)

Source from the content-addressed store, hash-verified

112}
113
114func DecorateWithParamName(err error, field string) error {
115 errTmpl := "invalid parameter %q; %v"
116 if status, ok := status.FromError(err); ok {
117 return httpgrpc.Errorf(int(status.Code()), errTmpl, field, status.Message())
118 }
119 return fmt.Errorf(errTmpl, field, err)
120}

Callers 3

DecodeRequestMethod · 0.92
DecodeRequestMethod · 0.92
invalidParamErrorFunction · 0.85

Calls 1

MessageMethod · 0.80

Tested by

no test coverage detected