Skip to content

Commit

Permalink
return an error if the URL cannot be cloned.
Browse files Browse the repository at this point in the history
prevents any downstream issues and errors.
  • Loading branch information
daveshanley committed May 2, 2024
1 parent 00b6c0d commit c47b728
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions daemon/handle_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ func (ws *WiretapService) handleHttpRequest(request *model.Request) {
Variables: config.CompiledVariables,
})

if newReq == nil || apiRequest == nil {
ws.config.Logger.Error("[wiretap] unable to clone API request, failed", "url", request.HttpRequest.URL.String())
return
}

var requestErrors []*errors.ValidationError
var responseErrors []*errors.ValidationError

Expand Down

0 comments on commit c47b728

Please sign in to comment.