mirror of https://github.com/portainer/portainer
feat(api): add debug statements in response handling
parent
79f4c20c25
commit
5df09923b6
|
@ -4,6 +4,7 @@ import (
|
|||
"bytes"
|
||||
"encoding/json"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
|
@ -48,8 +49,10 @@ func getResponseAsJSONArray(response *http.Response) ([]interface{}, error) {
|
|||
if responseObject["message"] != nil {
|
||||
return nil, portainer.Error(responseObject["message"].(string))
|
||||
}
|
||||
log.Printf("Response: %+v\n", responseObject)
|
||||
return nil, ErrInvalidResponseContent
|
||||
default:
|
||||
log.Printf("Response: %+v\n", responseObject)
|
||||
return nil, ErrInvalidResponseContent
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue