Return APIResponse even with error in MakeRequest, closes #66.
This commit is contained in:
parent
d74d1f3472
commit
80bdd621f7
1 changed files with 1 additions and 1 deletions
2
bot.go
2
bot.go
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue