diff --git a/cmd/storage-rest-server.go b/cmd/storage-rest-server.go index 5fb896e30..73c016ab5 100644 --- a/cmd/storage-rest-server.go +++ b/cmd/storage-rest-server.go @@ -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) }