Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit 8a7a4b4

Browse files
authored
Improve error logging (#8)
1 parent 4ec9965 commit 8a7a4b4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mcp/sonarqube/tools.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ pub fn init_sonarqube_client() -> Result<(), SonarError> {
4848
pub fn get_client() -> Result<&'static Arc<SonarQubeClient>, SonarError> {
4949
SONARQUBE_CLIENT
5050
.get()
51-
.ok_or_else(|| SonarError::Config("SonarQube client not initialized".to_string()))
51+
.ok_or_else(|| SonarError::Config(
52+
"SonarQube client not initialized. Make sure SONARQUBE_URL and SONARQUBE_TOKEN environment variables are set.".to_string()
53+
))
5254
}
5355

5456
/// Register SonarQube tools to the router

0 commit comments

Comments
 (0)