{"record":{"id":"83d86ce82f375ab4","repo":"ToolJet/ToolJet","slug":"invalid-credentials-83d86c","errorCode":null,"errorMessage":"Invalid credentials","messagePattern":"Invalid credentials","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"plugins/packages/clickhouse/lib/index.ts","lineNumber":63,"sourceCode":"          });\n          result = { r:1 }; //for backward compatibility\n          break;\n        }\n      }\n    } catch (error) {\n      throw new QueryError('Query could not be completed', error.message, {});\n    }\n    return {\n      status: 'ok',\n      data: result,\n    };\n  }\n  async testConnection(sourceOptions: SourceOptions): Promise<ConnectionTestResult> {\n\n\n    const clickhouse = await this.getConnection(sourceOptions);\n    if (!clickhouse) {\n      throw new Error('Invalid credentials');\n    }\n    const resultSet = await clickhouse.query({\n      query: 'SHOW DATABASES',\n      format: 'JSON',\n    });\n    await resultSet.json();\n    return {\n      status: 'ok',\n    };\n\n\n  }\n  async getConnection(sourceOptions: SourceOptions): Promise<any> {\n    const { port, host, protocol, database, username, password } = sourceOptions;\n    const url = `${protocol}://${host}:${port}`;\n    const clickhouse = createClient({\n      host: url,\n      username: username || 'default',","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/ToolJet/ToolJet/blob/20602a8e101f2e59686c9afde0d1402aac2c8871/plugins/packages/clickhouse/lib/index.ts#L45-L81","documentation":"Error \"Invalid credentials\" thrown in ToolJet/ToolJet.","triggerScenarios":"ClickHouse rejects the configured username/password or the credentials are missing.","commonSituations":"Defend by requiring username and password in source options and testing them at connection time.","solutions":["Provide valid ClickHouse credentials so a client connection can be created.","Verify host/port and TLS settings for the ClickHouse server."],"exampleFix":"Correct the ClickHouse host/credentials in the data source and re-test the connection.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"20602a8e101f2e59686c9afde0d1402aac2c8871","analyzedAt":"2026-08-13T05:58:54.221Z","schemaVersion":2},"datasetVersion":"2026-08-13T09:17:06.757Z"}