projectdiscovery/nuclei · error

"elasticsearch responded with an error: " + string(b)

Error message

"elasticsearch responded with an error: " + string(b)

What it means

Error ""elasticsearch responded with an error: " + string(b)" thrown in projectdiscovery/nuclei.

Source

Thrown at pkg/reporting/exporters/es/elasticsearch.go:150

		return err
	}
	req.Body = io.NopCloser(bytes.NewReader(b))

	res, err := exporter.elasticsearch.Do(req)
	if err != nil {
		return err
	}
	defer func() {
		_ = res.Body.Close()
	}()

	b, err = io.ReadAll(res.Body)
	if err != nil {
		return errors.New(err.Error() + "error thrown by elasticsearch " + string(b))
	}

	if res.StatusCode >= 300 {
		return errors.New("elasticsearch responded with an error: " + string(b))
	}
	return nil
}

// Close closes the exporter after operation
func (exporter *Exporter) Close() error {
	return nil
}

View on GitHub (pinned to 265b3a3dec)

When it happens

Trigger: Thrown at pkg/reporting/exporters/es/elasticsearch.go:150 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of projectdiscovery/nuclei@265b3a3dec (2026-08-15). Data as JSON: /api/errors/f7fd021f9c9d6ad9. Report an issue: GitHub.