mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-08-08 03:54:18 +00:00
Fix: minor error handling bug (#737)
Co-authored-by: Igor Gov <igor.govorov1@gmail.com>
This commit is contained in:
parent
0f6c56986f
commit
7846d812c1
@ -6,11 +6,12 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/google/martian/har"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/google/martian/har"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Protocol struct {
|
type Protocol struct {
|
||||||
@ -282,7 +283,7 @@ func (h HTTPPayload) MarshalJSON() ([]byte, error) {
|
|||||||
RawResponse: &HTTPResponseWrapper{Response: h.Data.(*http.Response)},
|
RawResponse: &HTTPResponseWrapper{Response: h.Data.(*http.Response)},
|
||||||
})
|
})
|
||||||
default:
|
default:
|
||||||
panic(fmt.Sprintf("HTTP payload cannot be marshaled: %s", h.Type))
|
panic(fmt.Sprintf("HTTP payload cannot be marshaled: %v", h.Type))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user