{"record":{"id":"3a1412ee0cf9fffb","repo":"cube-js/cube","slug":"e-to-string-auth-error-message-wrapped-in-io-e","errorCode":null,"errorMessage":"e.to_string() (auth error message wrapped in io::Error)","messagePattern":"e\\.to_string\\(\\) \\(auth error message wrapped in io::Error\\)","errorType":"exception","errorClass":"std::io::Error (ErrorKind::Other)","httpStatus":null,"severity":"error","filePath":"rust/cubestore/cubestore/src/mysql/mod.rs","lineNumber":182,"sourceCode":"            );\n        }\n        Ok(())\n    }\n\n    async fn on_auth<'a>(&'a mut self, user: Vec<u8>) -> Result<Option<Vec<u8>>, Self::Error>\n    where\n        W: 'async_trait,\n    {\n        self.user = if !user.is_empty() {\n            Some(String::from_utf8_lossy(user.as_slice()).to_string())\n        } else {\n            None\n        };\n        self.auth\n            .authenticate(self.user.clone())\n            .await\n            .map(|p| p.map(|p| p.as_bytes().to_vec()))\n            .map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))\n    }\n}\n\npub struct MySqlServer {\n    address: String,\n    sql_service: Arc<dyn SqlService>,\n    auth: Arc<dyn SqlAuthService>,\n    close_socket_rx: RwLock<watch::Receiver<bool>>,\n    close_socket_tx: watch::Sender<bool>,\n}\n\ncrate::di_service!(MySqlServer, []);\n\n#[async_trait]\nimpl ProcessingLoop for MySqlServer {\n    async fn processing_loop(&self) -> Result<(), CubeError> {\n        let listener = TcpListener::bind(self.address.clone()).await?;\n","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/rust/cubestore/cubestore/src/mysql/mod.rs#L164-L200","documentation":"The Cube Store MySQL protocol server's authentication callback: the configured authenticator rejected the credentials, and the authentication error is wrapped into an io::Error so the wire protocol layer can return it to the client. The authenticator's original message (the meaningful part) is carried in the error string.","triggerScenarios":"Thrown at rust/cubestore/cubestore/src/mysql/mod.rs:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the username and password used to connect to Cube Store's MySQL port","Verify the authenticator configuration on the Cube Store router"],"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"}