From 7846d812c1c1b32d8707eb080f65bc45af7553ad Mon Sep 17 00:00:00 2001 From: Igor Gov Date: Tue, 1 Feb 2022 09:21:17 +0200 Subject: [PATCH] Fix: minor error handling bug (#737) Co-authored-by: Igor Gov --- tap/api/api.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tap/api/api.go b/tap/api/api.go index 0c5054adc..bd74387a8 100644 --- a/tap/api/api.go +++ b/tap/api/api.go @@ -6,11 +6,12 @@ import ( "encoding/json" "errors" "fmt" - "github.com/google/martian/har" "io/ioutil" "net/http" "sync" "time" + + "github.com/google/martian/har" ) type Protocol struct { @@ -282,7 +283,7 @@ func (h HTTPPayload) MarshalJSON() ([]byte, error) { RawResponse: &HTTPResponseWrapper{Response: h.Data.(*http.Response)}, }) default: - panic(fmt.Sprintf("HTTP payload cannot be marshaled: %s", h.Type)) + panic(fmt.Sprintf("HTTP payload cannot be marshaled: %v", h.Type)) } }