mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 04:55:28 +00:00
Update elasticsearch.go
This commit is contained in:
parent
54214eb400
commit
712e3aeb72
@ -104,7 +104,11 @@ func (i *Exporter) Export(event *output.ResultEvent) error {
|
||||
req.Body = ioutil.NopCloser(bytes.NewReader(b))
|
||||
|
||||
res, err := i.elasticsearch.Do(req)
|
||||
b, _ = ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
b, err = ioutil.ReadAll(res.Body)
|
||||
if err != nil {
|
||||
return errors.New(err.Error() + "error thrown by elasticsearch " + string(b))
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user