properly return error values if a server error occurs

This commit is contained in:
2026-03-28 07:25:59 +00:00
parent 3636878bb7
commit 5788e1b493
3 changed files with 9 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ func HandleGETIndex(c *gin.Context) {
instances, _, err := GetClusterResources(auth)
if err != nil {
common.HandleNonFatalError(c, err)
return
}
page := gin.H{
"global": common.Global,
@@ -68,6 +69,7 @@ func HandleGETInstancesFragment(c *gin.Context) {
instances, _, err := GetClusterResources(auth)
if err != nil {
common.HandleNonFatalError(c, err)
return
}
c.Header("Content-Type", "text/plain")
common.TMPL.ExecuteTemplate(c.Writer, "html/index-instances.go.tmpl", gin.H{