mirror of
https://github.com/minio/minio.git
synced 2024-12-24 22:25:54 -05:00
Return cancelled storage calls as 499 (#17895)
Make upstream cancels more visible - right now they are just reported as "forbidden".
This commit is contained in:
parent
f506117edb
commit
7c8746732b
@ -64,6 +64,8 @@ func (s *storageRESTServer) writeErrorResponse(w http.ResponseWriter, err error)
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
case errInvalidAccessKeyID, errAccessKeyDisabled, errNoAuthToken, errMalformedAuth, errAuthentication, errSkewedAuthTime:
|
||||
w.WriteHeader(http.StatusUnauthorized)
|
||||
case context.Canceled, context.DeadlineExceeded:
|
||||
w.WriteHeader(499)
|
||||
default:
|
||||
w.WriteHeader(http.StatusForbidden)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user