googleapis/mcp-toolbox · error

unable to execute SQL request: %w

Error message

unable to execute SQL request: %w

What it means

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

Source

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

	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)))
	}

	var decoded map[string]any
	if err := json.Unmarshal(body, &decoded); err != nil {
		return nil, fmt.Errorf("unable to parse SQL response: %w", err)
	}

	if strings.HasPrefix(strings.ToUpper(strings.TrimSpace(sqlStr)), "EXPLAIN") {
		resp := map[string]any{}

View on GitHub (pinned to 8cc6e09de2)

When it happens

Trigger: Thrown at internal/sources/arcadedb/arcadedb.go:208 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/e3cf18eec3917927. Report an issue: GitHub.