Make returned error consistent.
parent
7a018ae873
commit
4b372faeeb
2
bot.go
2
bot.go
|
@ -111,7 +111,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
|
||||||
if apiResp.Parameters != nil {
|
if apiResp.Parameters != nil {
|
||||||
parameters = *apiResp.Parameters
|
parameters = *apiResp.Parameters
|
||||||
}
|
}
|
||||||
return apiResp, &Error{Code: apiResp.ErrorCode, Message: apiResp.Description, ResponseParameters: parameters}
|
return apiResp, Error{Code: apiResp.ErrorCode, Message: apiResp.Description, ResponseParameters: parameters}
|
||||||
}
|
}
|
||||||
|
|
||||||
return apiResp, nil
|
return apiResp, nil
|
||||||
|
|
Loading…
Reference in New Issue