Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4f9923c

Browse files
committed
impl: prefer agent name over agent id in URI handler (2)
Error reporting should also prefer agent name over the agent id.
1 parentb54b74a commit4f9923c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/main/kotlin/com/coder/gateway/util/LinkHandler.kt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,12 +339,12 @@ internal fun getMatchingAgent(
339339
}
340340

341341
if (agent==null) {
342-
if (!parameters.agentID().isNullOrBlank()) {
343-
throwIllegalArgumentException("The workspace\"${workspace.name}\" does not have an agent with ID\"${parameters.agentID()}\"")
344-
}elseif (!parameters.agentName().isNullOrBlank()) {
342+
if (!parameters.agentName().isNullOrBlank()) {
345343
throwIllegalArgumentException(
346-
"The workspace\"${workspace.name}\"does not have an agent named\"${parameters.agentName()}\"",
344+
"The workspace\"${workspace.name}\"does not have an agent named\"${parameters.agentName()}\"",
347345
)
346+
}elseif (!parameters.agentID().isNullOrBlank()) {
347+
throwIllegalArgumentException("The workspace\"${workspace.name}\" does not have an agent with ID\"${parameters.agentID()}\"")
348348
}else {
349349
throwMissingArgumentException(
350350
"Unable to determine which agent to connect to; one of\"$AGENT_NAME\" or\"$AGENT_ID\" must be set because the workspace\"${workspace.name}\" has more than one agent",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp