diff --git a/pkg/gateway/accounts.go b/pkg/gateway/accounts.go index 5b5a5d3..7d58519 100644 --- a/pkg/gateway/accounts.go +++ b/pkg/gateway/accounts.go @@ -182,13 +182,17 @@ func (h *AccountsHandler) servePortal( subject: fmt.Sprintf(hz.SubjectPortalRender, portal), account: account, } + proxy.ErrorHandler = func(w http.ResponseWriter, r *http.Request, err error) { + w.WriteHeader(http.StatusOK) + _ = portalError(err).Render(r.Context(), w) + } proxy.ServeHTTP(w, r) return } body := accountLayout( account, h.Portals, - actorProxyPage(account, portal, subpath), + portalProxy(account, portal, subpath), ) layout(portal, &userInfo, body).Render(r.Context(), w) } diff --git a/pkg/gateway/main.templ b/pkg/gateway/main.templ index b2c6377..bdfbcb3 100644 --- a/pkg/gateway/main.templ +++ b/pkg/gateway/main.templ @@ -116,7 +116,7 @@ templ accountsNewPage() { } -templ actorProxyPage(account string, actor string, subpath string) { +templ portalProxy(account string, actor string, subpath string) { if subpath == "" {
You have been logged out.
} + +templ portalError(err error) { +{ err.Error() }+