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

Commit 55d8250

Browse files
committed
Log the full URL even on error
1 parent 3ef22b1 commit 55d8250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/openapi2mcp/register.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,7 @@ func RegisterOpenAPITools(server *mcpserver.MCPServer, ops []OpenAPIOperation, d
12151215
}, nil
12161216
}
12171217
// Create a simple text error message
1218-
errorText := fmt.Sprintf("HTTP Error: %s (HTTP %d)", http.StatusText(resp.StatusCode), resp.StatusCode)
1218+
errorText := fmt.Sprintf("HTTP %s %s\nError: %s (HTTP %d)", opCopy.Method, fullURL, http.StatusText(resp.StatusCode), resp.StatusCode)
12191219
if len(respBody) > 0 {
12201220
errorText += "\nDetails: " + string(respBody)
12211221
}

0 commit comments

Comments
 (0)