X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/c781f79f3c8cb9a7577ee1574d196988da2719b3..496569ab5b179932c60b2924bf4c61176c8be004:/telegram_api.go?ds=sidebyside diff --git a/telegram_api.go b/telegram_api.go index 3a44a0d..0d44852 100644 --- a/telegram_api.go +++ b/telegram_api.go @@ -333,8 +333,8 @@ func (b *TelegramAPI) SendTyping(ctx context.Context, chat int64) error { // call sends one call of method with the JSON params and decodes its result // into result, when result is not nil. The call can take up to timeout. Its -// errors tell the cause in plain words, with no method name, so that a log line -// can say first what the call was for. +// request setup errors name the method. Network and answer errors give a safe +// cause, so the caller can add the operation without exposing the request URL. func (b *TelegramAPI) call(ctx context.Context, timeout time.Duration, method string, params, result any) error { ctx, cancel := context.WithTimeout(ctx, timeout) defer cancel()