MCPcopy Index your code
hub / github.com/NVIDIA/aistore / S2HTTPErr

Function S2HTTPErr

cmn/err.go:858–866  ·  view source on GitHub ↗
(r *http.Request, msg string, status int)

Source from the content-addressed store, hash-verified

856}
857
858func S2HTTPErr(r *http.Request, msg string, status int) *ErrHTTP {
859 if msg != "" {
860 var httpErr ErrHTTP
861 if err := jsoniter.UnmarshalFromString(msg, &httpErr); err == nil {
862 return &httpErr
863 }
864 }
865 return NewErrHTTP(r, msg, status)
866}
867
868func Err2HTTPErr(err error) *ErrHTTP {
869 if e, ok := err.(*ErrHTTP); ok {

Callers 1

callMethod · 0.92

Calls 1

NewErrHTTPFunction · 0.85

Tested by

no test coverage detected