Return APIResponse even with error in MakeRequest, closes #66.

bot-api-6.1
Syfaro 2016-12-31 13:48:48 -06:00
parent d74d1f3472
commit 80bdd621f7
1 changed files with 1 additions and 1 deletions

2
bot.go
View File

@ -81,7 +81,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
json.Unmarshal(bytes, &apiResp)
if !apiResp.Ok {
return APIResponse{}, errors.New(apiResp.Description)
return apiResp, errors.New(apiResp.Description)
}
return apiResp, nil