mirror of https://github.com/daffainfo/nuclei.git
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"dev
parent
10ebc31202
commit
5f7e6eadae
|
@ -141,7 +141,7 @@ func (e *HTTPExecuter) ExecuteHTTP(ctx context.Context, p progress.IProgress, re
|
||||||
for e.bulkHTTPRequest.Next(reqURL) && !result.Done {
|
for e.bulkHTTPRequest.Next(reqURL) && !result.Done {
|
||||||
httpRequest, err := e.bulkHTTPRequest.MakeHTTPRequest(ctx, reqURL, dynamicvalues, e.bulkHTTPRequest.Current(reqURL))
|
httpRequest, err := e.bulkHTTPRequest.MakeHTTPRequest(ctx, reqURL, dynamicvalues, e.bulkHTTPRequest.Current(reqURL))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result.Error = errors.Wrap(err, "could not build http request")
|
result.Error = err
|
||||||
|
|
||||||
p.Drop(remaining)
|
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)
|
err = e.handleHTTP(reqURL, httpRequest, dynamicvalues, &result)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
result.Error = errors.Wrap(err, "could not handle http request")
|
result.Error = err
|
||||||
|
|
||||||
p.Drop(remaining)
|
p.Drop(remaining)
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ func (e *HTTPExecuter) handleHTTP(reqURL string, request *requests.HTTPRequest,
|
||||||
if e.debug {
|
if e.debug {
|
||||||
dumpedRequest, err := httputil.DumpRequest(req.Request, true)
|
dumpedRequest, err := httputil.DumpRequest(req.Request, true)
|
||||||
if err != nil {
|
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)
|
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()
|
resp.Body.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors.Wrap(err, "Could not do request")
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
if e.debug {
|
if e.debug {
|
||||||
|
|
Loading…
Reference in New Issue