madmin: Little error description when parsing server error msg (#9709)

master
Anis Elleuch 5 years ago committed by GitHub
parent 9d39fb3604
commit cccf2de129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/madmin/api-error-response.go

@ -18,6 +18,7 @@ package madmin
import ( import (
"encoding/xml" "encoding/xml"
"fmt"
"net/http" "net/http"
) )
@ -70,7 +71,7 @@ func httpRespToErrorResponse(resp *http.Response) error {
if err != nil { if err != nil {
return ErrorResponse{ return ErrorResponse{
Code: resp.Status, Code: resp.Status,
Message: "Failed to parse server response.", Message: fmt.Sprintf("Failed to parse server response: %s.", err),
} }
} }
closeResponse(resp) closeResponse(resp)

Loading…
Cancel
Save