From f90fe2b1e71b24329a82639470954bb739484fa5 Mon Sep 17 00:00:00 2001 From: Oktarian Tilney-Bassett Date: Tue, 18 Oct 2022 11:35:06 +0100 Subject: [PATCH] Make details more idiomatic --- notify/webhook/webhook.go | 2 +- notify/webhook/webhook_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/notify/webhook/webhook.go b/notify/webhook/webhook.go index c86c604675..b47009a759 100644 --- a/notify/webhook/webhook.go +++ b/notify/webhook/webhook.go @@ -118,5 +118,5 @@ func errDetails(body io.Reader, url string) string { if err != nil { return url } - return fmt.Sprintf("%s at %s", string(bs), url) + return fmt.Sprintf("%s: %s", url, string(bs)) } diff --git a/notify/webhook/webhook_test.go b/notify/webhook/webhook_test.go index 60094a35cd..116ee1c2b3 100644 --- a/notify/webhook/webhook_test.go +++ b/notify/webhook/webhook_test.go @@ -67,7 +67,7 @@ func TestWebhookRetry(t *testing.T) { `{"status":"invalid event"}`, )), - exp: fmt.Sprintf(`unexpected status code %d: {"status":"invalid event"} at %s`, http.StatusBadRequest, u.String()), + exp: fmt.Sprintf(`unexpected status code %d: %s: {"status":"invalid event"}`, http.StatusBadRequest, u.String()), }, { status: http.StatusBadRequest,