fix UploadFile not properly throwing an error when not Ok response
Syfaro syfaro@foxpaw.in
Mon, 26 Oct 2015 08:02:46 -0500
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
methods.go
→
methods.go
@@ -290,6 +290,10 @@
var apiResp APIResponse json.Unmarshal(bytes, &apiResp) + if !apiResp.Ok { + return APIResponse{}, errors.New(apiResp.Description) + } + return apiResp, nil }