{"record":{"id":"d2fae21dfcc9feb8","repo":"getredash/redash","slug":"connection-error-to-url-details","errorCode":null,"errorMessage":"Connection error to: {url} {details}.","messagePattern":"Connection error to: (.+?) (.+?)\\.","errorType":"http","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"redash/query_runner/tinybird.py","lineNumber":105,"sourceCode":"\n    def _get_from_tinybird(self, endpoint, params=None):\n        url = f\"{self.configuration.get('url', self.DEFAULT_URL)}{endpoint}\"\n        authorization = f\"Bearer {self.configuration.get('token')}\"\n\n        try:\n            response = requests.get(\n                url,\n                timeout=self.configuration.get(\"timeout\", 30),\n                params=params,\n                headers={\"Authorization\": authorization},\n                verify=self.configuration.get(\"verify\", True),\n            )\n        except requests.RequestException as e:\n            if e.response:\n                details = f\"({e.__class__.__name__}, Status Code: {e.response.status_code})\"\n            else:\n                details = f\"({e.__class__.__name__})\"\n            raise Exception(f\"Connection error to: {url} {details}.\")\n\n        if response.status_code >= 400:\n            raise Exception(response.text)\n\n        return response.json()\n\n\nregister(Tinybird)\n","sourceCodeStart":87,"sourceCodeEnd":114,"githubUrl":"https://github.com/getredash/redash/blob/ca79fe988d81cdac9675b412f3dfcab107bc1fbc/redash/query_runner/tinybird.py#L87-L114","documentation":"Raised by Tinybird._get_from_tinybird (redash/query_runner/tinybird.py:105) when the HTTP request to the Tinybird API raises a requests.RequestException (DNS failure, connection refused, TLS error, timeout). The message embeds the URL and the exception class name plus status code when a response exists — note this fires for transport-level failures; HTTP 4xx/5xx responses that do arrive raise a different exception with response.text.","triggerScenarios":"Running a Tinybird data source query or refreshing its schema when the Redash server cannot reach https://api.tinybird.com (or the configured region host): blocked egress, proxy misconfiguration, DNS outage, or request timeout.","commonSituations":"Containerized Redash without outbound internet or with an unset HTTPS_PROXY; firewall rules blocking the analytics API; transient network outage or Tinybird endpoint temporarily unreachable; custom regional endpoint typo.","solutions":["From the Redash host, verify connectivity: `curl -sS https://api.tinybird.com/` and check DNS/proxy env vars","Configure HTTPS_PROXY/HTTP_PROXY (and NO_PROXY) for the worker if egress goes through a proxy","Verify the endpoint/token region host is spelled correctly in the data source settings","Retry after transient outages; inspect the embedded exception class (ConnectionError vs Timeout) to narrow the cause"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"import socket, requests\ntry:\n    requests.head('https://api.tinybird.com/', timeout=5)\nexcept requests.RequestException:\n    raise RuntimeError('Tinybird endpoint unreachable from this host')","typeGuard":null,"tryCatchPattern":"for attempt in range(3):\n    try:\n        return _get_from_tinybird(url)\n    except Exception as e:\n        if attempt == 2 or 'Connection error' not in str(e):\n            raise\n        time.sleep(2 ** attempt)","preventionTips":["Configure proxy env vars for containerized workers that need egress","Monitor connectivity to api.tinybird.com from the Redash host","Implement bounded retry with backoff for transient transport errors"],"tags":["tinybird","http","network","redash"],"backgroundTag":"http-request-failed","analyzedSha":"ca79fe988d81cdac9675b412f3dfcab107bc1fbc","analyzedAt":"2026-08-28T18:32:34.637Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}