all repos — telegram-bot-api @ 0d2feed6c26a7bd6c5458e970afd1f72a21d0dd8

Golang bindings for the Telegram Bot API

fix UploadFile not properly throwing an error when not Ok response
Syfaro syfaro@foxpaw.in
Mon, 26 Oct 2015 08:02:46 -0500
commit

0d2feed6c26a7bd6c5458e970afd1f72a21d0dd8

parent

e1a0a819c0036d628c5ef449135c7963006f7cbc

1 files changed, 4 insertions(+), 0 deletions(-)

jump to
M methods.gomethods.go

@@ -290,6 +290,10 @@

var apiResp APIResponse json.Unmarshal(bytes, &apiResp) + if !apiResp.Ok { + return APIResponse{}, errors.New(apiResp.Description) + } + return apiResp, nil }