Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,8 @@ fun addMcpInstanceDialog(
secondaryButton(
onClick = {
dialogState.clearError()
testSuccess = null
availableTools = emptyList()
isTesting = true
scope.launch {
try {
Expand All @@ -416,10 +418,12 @@ fun addMcpInstanceDialog(
}
.onFailure { e ->
testSuccess = false
availableTools = emptyList()
dialogState.setError(e, "Failed to connect to MCP server. Check your configuration.")
}
} catch (e: Exception) {
testSuccess = false
availableTools = emptyList()
dialogState.setError(e, "Connection test failed")
} finally {
isTesting = false
Expand All @@ -433,6 +437,8 @@ fun addMcpInstanceDialog(
primaryButton(
onClick = {
dialogState.clearError()
testSuccess = null
availableTools = emptyList()
isTesting = true
scope.launch {
try {
Expand All @@ -447,10 +453,12 @@ fun addMcpInstanceDialog(
}
.onFailure { e ->
testSuccess = false
availableTools = emptyList()
dialogState.setError(e, "Failed to connect to MCP server. Check your configuration.")
}
} catch (e: Exception) {
testSuccess = false
availableTools = emptyList()
dialogState.setError(e, "Failed to save MCP instance")
} finally {
isTesting = false
Expand Down
Loading