Make returned error consistent.

bot-api-6.1
Syfaro 2020-07-21 03:56:23 -05:00 committed by GitHub
parent 7a018ae873
commit 4b372faeeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

2
bot.go
View File

@ -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