googleapis/mcp-toolbox · error

unable to create SQL request: %w

Error message

unable to create SQL request: %w

What it means

Error "unable to create SQL request: %w" thrown in googleapis/mcp-toolbox.

Source

Thrown at internal/sources/arcadedb/arcadedb.go:201

		return nil, err
	}

	requestBody := map[string]any{
		"language": "sql",
		"command":  sqlStr,
	}
	if params != nil {
		requestBody["params"] = params
	}

	payload, err := json.Marshal(requestBody)
	if err != nil {
		return nil, fmt.Errorf("unable to serialize SQL request: %w", err)
	}

	req, err := http.NewRequestWithContext(ctx, http.MethodPost, httpURL, bytes.NewReader(payload))
	if err != nil {
		return nil, fmt.Errorf("unable to create SQL request: %w", err)
	}
	req.SetBasicAuth(s.User, s.Password)
	req.Header.Set("Content-Type", "application/json")

	resp, err := arcadeHTTPClient.Do(req)
	if err != nil {
		return nil, fmt.Errorf("unable to execute SQL request: %w", err)
	}
	defer resp.Body.Close()

	body, err := io.ReadAll(resp.Body)
	if err != nil {
		return nil, fmt.Errorf("unable to read SQL response: %w", err)
	}
	if resp.StatusCode < 200 || resp.StatusCode >= 300 {
		return nil, fmt.Errorf("unable to execute SQL request: status %d: %s", resp.StatusCode, strings.TrimSpace(string(body)))
	}

View on GitHub (pinned to 8cc6e09de2)

When it happens

Trigger: Thrown at internal/sources/arcadedb/arcadedb.go:201 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of googleapis/mcp-toolbox@8cc6e09de2 (2026-09-05). Data as JSON: /api/errors/599572375f997675. Report an issue: GitHub.