package page import "git.haelnorr.com/h/oslstats/internal/view/layout" import "strconv" // Original Error template (keep for backwards compatibility where needed) templ Error(code int, err string, message string) { @ErrorWithDetails(code, err, message, "") } // Enhanced Error template with optional details section templ ErrorWithDetails(code int, err string, message string, details string) { @layout.Global(err) {

{ strconv.Itoa(code) }

{ err }

// Always show the message from hws.HWSError.Message

{ message }

// Conditionally show technical details in dropdown if details != "" {
Details (click to expand)
{ details }
} Go to homepage
if details != "" { } } }