return pointer to error

bot-api-6.1
NemoD503 2019-10-20 22:47:21 +03:00
parent b33efeebc7
commit a6b4ce46a6
1 changed files with 1 additions and 1 deletions

2
bot.go
View File

@ -92,7 +92,7 @@ func (bot *BotAPI) MakeRequest(endpoint string, params url.Values) (APIResponse,
if apiResp.Parameters != nil {
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