From 092161ff6f75f28ba969398f500b680a8aa831cf Mon Sep 17 00:00:00 2001 From: Umputun Date: Thu, 25 Oct 2018 11:52:53 -0500 Subject: [PATCH] show url on err message --- backend/app/notify/telegram.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/notify/telegram.go b/backend/app/notify/telegram.go index e4621d8a..038f73fc 100644 --- a/backend/app/notify/telegram.go +++ b/backend/app/notify/telegram.go @@ -74,7 +74,7 @@ func NewTelegram(token string, channelName string, timeout time.Duration, api st // Send to telegram channel func (t *Telegram) Send(ctx context.Context, req request) error { client := http.Client{Timeout: telegramTimeOut} - + log.Printf("[DEBUG] send telegram notification to %s, comment id %s", t.channelName, req.comment.ID) from := req.comment.User.Name if req.comment.ParentID != "" { from += " -> " + req.parent.User.Name @@ -102,7 +102,7 @@ func (t *Telegram) Send(ctx context.Context, req request) error { }() if resp.StatusCode != http.StatusOK { - return errors.Errorf("unexpected telegram status code %d", resp.StatusCode) + return errors.Errorf("unexpected telegram status code %d for url %q", resp.StatusCode, u) } tgResp := struct {