Skip to content

Commit

Permalink
fix: remove post request error dialog (#76)
Browse files Browse the repository at this point in the history
* fix: remove post request error dialog
  • Loading branch information
mirzakhany authored Aug 30, 2024
1 parent a4758be commit 3891d97
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/pages/requests/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,9 @@ func (c *Controller) onPostRequestSetChanged(id string, statusCode int, item, fr
func (c *Controller) setPreviewFromResponse(id string, responseData *domain.HTTPResponseDetail, fromKey string) {
resp, err := rest.GetJSONPATH(responseData.Response, fromKey)
if err != nil {
c.view.showError(fmt.Errorf("failed to get data from response, %w", err))
// TODO show error without interrupting the user
fmt.Println("failed to get data from response, %w", err)
// c.view.showError(fmt.Errorf("failed to get data from response, %w", err))
return
}

Expand All @@ -238,6 +240,8 @@ func (c *Controller) setPreviewFromResponse(id string, responseData *domain.HTTP

if result, ok := resp.(string); ok {
c.view.SetPostRequestSetPreview(id, result)
} else {
c.view.SetPostRequestSetPreview(id, fmt.Sprintf("%v", resp))
}
}

Expand Down

0 comments on commit 3891d97

Please sign in to comment.