MCPcopy
hub / github.com/rclone/rclone / getHTTPStatusCode

Function getHTTPStatusCode

backend/s3/s3.go:1214–1220  ·  view source on GitHub ↗

gets an http status code from err or returns -1

(err error)

Source from the content-addressed store, hash-verified

1212
1213// gets an http status code from err or returns -1
1214func getHTTPStatusCode(err error) int {
1215 var httpErr interface{ HTTPStatusCode() int }
1216 if errors.As(err, &httpErr) {
1217 return httpErr.HTTPStatusCode()
1218 }
1219 return -1
1220}
1221
1222// parseRetainUntilDate parses a retain until date from a string.
1223// It accepts RFC 3339 format or duration strings like "365d", "1y", "6m".

Callers 4

shouldRetryMethod · 0.85
listMethod · 0.85
bucketExistsMethod · 0.85
headObjectMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…