Fix Groovy syntax error in EnhancedMcpServlet - move variable assignment outside JSON structure
- Previous edit incorrectly placed variable definition inside JSON map literal
- Move actualResult assignment outside JsonOutput.toJson call
- Resolves build error: Unexpected input '(' @ line 537
Showing
1 changed file
with
3 additions
and
2 deletions
| ... | @@ -534,11 +534,12 @@ try { | ... | @@ -534,11 +534,12 @@ try { |
| 534 | response.setContentType("application/json") | 534 | response.setContentType("application/json") |
| 535 | response.setCharacterEncoding("UTF-8") | 535 | response.setCharacterEncoding("UTF-8") |
| 536 | response.setStatus(HttpServletResponse.SC_OK) | 536 | response.setStatus(HttpServletResponse.SC_OK) |
| 537 | |||
| 538 | // Extract actual result from service response (same as regular handler) | ||
| 539 | def actualResult = result?.result ?: result | ||
| 537 | response.writer.write(JsonOutput.toJson([ | 540 | response.writer.write(JsonOutput.toJson([ |
| 538 | jsonrpc: "2.0", | 541 | jsonrpc: "2.0", |
| 539 | id: rpcRequest.id, | 542 | id: rpcRequest.id, |
| 540 | // Extract actual result from service response (same as regular handler) | ||
| 541 | def actualResult = result?.result ?: result | ||
| 542 | result: actualResult | 543 | result: actualResult |
| 543 | ])) | 544 | ])) |
| 544 | 545 | ... | ... |
-
Please register or sign in to post a comment