From 2aa47845186140274862377d29c888492dc51bb5 Mon Sep 17 00:00:00 2001 From: mrhid6 Date: Fri, 31 Jul 2026 16:13:51 +0100 Subject: [PATCH] feat: Better debugging for console --- server/internal/api/console.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/internal/api/console.go b/server/internal/api/console.go index a714156..a14be12 100644 --- a/server/internal/api/console.go +++ b/server/internal/api/console.go @@ -3,6 +3,7 @@ package api import ( "errors" "fmt" + "log" "net" "net/http" "os" @@ -147,6 +148,12 @@ func consoleTunnel(c *gin.Context) { c.JSON(http.StatusConflict, gin.H{"error": "agent_offline"}) return } + // Logged as well as answered. The client is deliberately told nothing + // specific, but this is the only place the real reason exists — a + // failed dispatch and a relay that was never announced are the same + // generic 500 to the browser, and guacamole then reports the missing + // upgrade as an upstream error, which points at the wrong hop entirely. + log.Printf("console: open relay for server %s: %v", srv.ServerID, err) c.JSON(http.StatusInternalServerError, gin.H{"error": "could not open relay"}) return }