MCPcopy
hub / github.com/NVIDIA/aistore / NewErrHTTP

Function NewErrHTTP

cmn/err.go:698–706  ·  view source on GitHub ↗

ErrHTTP //

(r *http.Request, msg string, opts ...int)

Source from the content-addressed store, hash-verified

696/////////////
697
698func NewErrHTTP(r *http.Request, msg string, opts ...int) (e *ErrHTTP) {
699 var errCode int
700 if len(opts) > 0 {
701 errCode = opts[0]
702 }
703 e = &ErrHTTP{}
704 e.init(r, msg, errCode)
705 return e
706}
707
708func (e *ErrHTTP) init(r *http.Request, msg string, errCode int) {
709 e.Status = http.StatusBadRequest

Callers 9

tryDownloadLocalMethod · 0.92
doMethod · 0.92
checkRespMethod · 0.92
writeErrActMethod · 0.92
writeErrActfMethod · 0.92
toErrMethod · 0.92
azureErrorToAISErrorFunction · 0.92
S2HTTPErrFunction · 0.85
WriteErrMsgFunction · 0.85

Calls 1

initMethod · 0.65

Tested by

no test coverage detected