{"record":{"id":"28b50f4af9973995","repo":"cube-js/cube","slug":"connection-test-failed-response-status-respo","errorCode":null,"errorMessage":"Connection test failed: ${response.status} ${response.statusText} - ${text}","messagePattern":"Connection test failed: (.+?) (.+?) - (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/cubejs-trino-driver/src/TrinoDriver.ts","lineNumber":46,"sourceCode":"    if (customAuth) {\n      headers.Authorization = customAuth;\n    } else if (basicAuth) {\n      const { user, password } = basicAuth;\n      const encoded = Buffer.from(`${user}:${password}`).toString('base64');\n      headers.Authorization = `Basic ${encoded}`;\n    }\n\n    const requestInit: RequestInit = { method: 'GET', headers };\n\n    if (ssl) {\n      requestInit.agent = new HttpsAgent({ ...ssl });\n    }\n\n    const response = await fetch(url, requestInit);\n\n    if (!response.ok) {\n      const text = await response.text();\n      throw new Error(`Connection test failed: ${response.status} ${response.statusText} - ${text}`);\n    }\n  }\n}\n","sourceCodeStart":28,"sourceCodeEnd":50,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-trino-driver/src/TrinoDriver.ts#L28-L50","documentation":"Thrown in TrinoDriver.testConnection when the HTTP GET against the Trino coordinator's info/status endpoint returns a non-2xx response. The error carries the HTTP status, status text, and response body, meaning the coordinator rejected or failed the connectivity probe (bad URL, auth rejected, server error, or unreachable gateway).","triggerScenarios":"Thrown at packages/cubejs-trino-driver/src/TrinoDriver.ts:46 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the coordinator URL/host/port configuration and that the Trino server is running.","Verify authentication headers — wrong user/password or custom Authorization header will be rejected here.","Inspect the included response body for Trino-side error details (e.g. 401/403 for auth, 404 for wrong path, 5xx for server issues).","If ssl is configured, confirm the HTTPS agent settings (certs) are correct."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}