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

Function HTTPStatus

api/client.go:59–67  ·  view source on GitHub ↗

HTTPStatus returns HTTP status or (-1) for non-HTTP error.

(err error)

Source from the content-addressed store, hash-verified

57
58// HTTPStatus returns HTTP status or (-1) for non-HTTP error.
59func HTTPStatus(err error) int {
60 if err == nil {
61 return http.StatusOK
62 }
63 if httpErr := cmn.Err2HTTPErr(err); httpErr != nil {
64 return httpErr.Status
65 }
66 return -1 // invalid
67}
68
69func getObjectOptParams(options GetObjectInput) (w io.Writer, q url.Values, hdr http.Header) {
70 w = io.Discard

Callers 6

reportErrFunction · 0.92
waitForStartupFunction · 0.92

Calls 1

Err2HTTPErrFunction · 0.92