From 5df09923b63973eec41fc3199e8df94da5015fbe Mon Sep 17 00:00:00 2001 From: Anthony Lapenna Date: Tue, 15 May 2018 19:13:27 +0200 Subject: [PATCH] feat(api): add debug statements in response handling --- api/http/proxy/response.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/http/proxy/response.go b/api/http/proxy/response.go index 751e3df31..3be65bbc6 100644 --- a/api/http/proxy/response.go +++ b/api/http/proxy/response.go @@ -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 } }