[mod] display response formatting errors instead of exit

pull/93/head
Adam Tauber 7 years ago
parent 8b38235ec1
commit 07ede4e6f1

@ -916,7 +916,8 @@ func (a *App) PrintBody(g *gocui.Gui) {
if search_text == "" || !responseFormatter.Searchable() {
err := responseFormatter.Format(vrb, req.RawResponseBody)
if err != nil {
return err
fmt.Fprintf(vrb, "Error: cannot decode response body: %v", err)
return nil
}
if _, err := vrb.Line(0); !a.config.General.PreserveScrollPosition || err != nil {
vrb.SetOrigin(0, 0)

Loading…
Cancel
Save