Skip to content

Commit

Permalink
Make details more idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Oktarian Tilney-Bassett committed Oct 18, 2022
1 parent 12e36e0 commit f90fe2b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion notify/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
2 changes: 1 addition & 1 deletion notify/webhook/webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f90fe2b

Please sign in to comment.