From 13fc1bc7974dc10b1e3319ca3b81d4ca66df85b7 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Fri, 1 Sep 2023 08:54:48 +0100 Subject: [PATCH] Log response body on http step failure --- protocol/http/step.go | 1 + 1 file changed, 1 insertion(+) diff --git a/protocol/http/step.go b/protocol/http/step.go index abe81f5..1e1d7be 100644 --- a/protocol/http/step.go +++ b/protocol/http/step.go @@ -61,6 +61,7 @@ func CheckStep(ctx context.Context, b *Browser, step *Step, debug *log.Logger) e } if step.ExpectedURL.IsSet() && !step.ExpectedURL.MatchString(resp.URL.String()) { + debug.Printf("response body:\n%s", resp.Body) return fmt.Errorf("expected URL %s, got %s instead", step.ExpectedURL.String(), resp.URL.String()) } if step.ExpectedData.IsSet() && !step.ExpectedData.MatchString(resp.Body) { -- GitLab