Do not wrap errors
It makes the warning message unreadable e.j: "Could not execute step: could not handle http request: Could not do request: ERR"
@@ -141,7 +141,7 @@ func (e *HTTPExecuter) ExecuteHTTP(ctx context.Context, p progress.IProgress, re
for e.bulkHTTPRequest.Next(reqURL) && !result.Done {
httpRequest, err := e.bulkHTTPRequest.MakeHTTPRequest(ctx, reqURL, dynamicvalues, e.bulkHTTPRequest.Current(reqURL))
if err != nil {
- result.Error = errors.Wrap(err, "could not build http request")
+ result.Error = err
p.Drop(remaining)
@@ -150,7 +150,7 @@ func (e *HTTPExecuter) ExecuteHTTP(ctx context.Context, p progress.IProgress, re
err = e.handleHTTP(reqURL, httpRequest, dynamicvalues, &result)
if err != nil {
- result.Error = errors.Wrap(err, "could not handle http request")
+ result.Error = err
p.Drop(remaining)
@@ -174,7 +174,7 @@ func (e *HTTPExecuter) handleHTTP(reqURL string, request *requests.HTTPRequest,
if e.debug {
dumpedRequest, err := httputil.DumpRequest(req.Request, true)
if err != nil {
- return errors.Wrap(err, "could not make http request")
+ return err
}
gologger.Infof("Dumped HTTP request for %s (%s)\n\n", reqURL, e.template.ID)
@@ -188,7 +188,7 @@ func (e *HTTPExecuter) handleHTTP(reqURL string, request *requests.HTTPRequest,
resp.Body.Close()
}
- return errors.Wrap(err, "Could not do request")
+ return err
}
if e.debug {
