projectdiscovery/nuclei · error

non-200 OK status code: %v body: %q

Error message

non-200 OK status code: %v body: %q

What it means

Error "non-200 OK status code: %v body: %q" thrown in projectdiscovery/nuclei.

Source

Thrown at pkg/reporting/trackers/linear/linear.go:394

	err := json.NewEncoder(&buf).Encode(in)
	if err != nil {
		return err
	}
	req, err := http.NewRequestWithContext(ctx, http.MethodPost, i.url, &buf)
	if err != nil {
		return err
	}
	req.Header.Set("Content-Type", "application/json")
	resp, err := i.httpclient.Do(req)
	if err != nil {
		return err
	}
	defer func() {
		_ = resp.Body.Close()
	}()
	if resp.StatusCode != http.StatusOK {
		body, _ := io.ReadAll(resp.Body)
		return fmt.Errorf("non-200 OK status code: %v body: %q", resp.Status, body)
	}
	var out struct {
		Data   *json.Message
		Errors errorsGraphql
		//Extensions any // Unused.
	}

	err = json.NewDecoder(resp.Body).Decode(&out)
	if err != nil {
		return err
	}
	if out.Data != nil {
		err := jsonutil.UnmarshalGraphQL(*out.Data, v)
		if err != nil {
			return err
		}
	}
	if len(out.Errors) > 0 {

View on GitHub (pinned to 265b3a3dec)

When it happens

Trigger: Thrown at pkg/reporting/trackers/linear/linear.go:394 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/1ef78f0ac842590d. Report an issue: GitHub.