summary refs log tree commit diff
path: root/handlers/portgate.go
diff options
context:
space:
mode:
Diffstat (limited to 'handlers/portgate.go')
-rw-r--r--handlers/portgate.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/handlers/portgate.go b/handlers/portgate.go
index 1cd9bb8..f53f3c9 100644
--- a/handlers/portgate.go
+++ b/handlers/portgate.go
@@ -2,7 +2,6 @@ package handlers
 
 import (
 	"github.com/valyala/fasthttp"
-	"net/http"
 	"portgate"
 )
 
@@ -37,8 +36,7 @@ func (h *RequestHandler) handlePortgatePageRequest(ctx *fasthttp.RequestCtx) {
 	ctx.Response.Header.SetContentType("text/html")
 	err := h.templates.ExecuteTemplate(ctx, "authenticate.template.html", nil)
 	if err != nil {
-		ctx.SetStatusCode(http.StatusInternalServerError)
-		_, _ = ctx.WriteString("An error occurred.")
+		h.handleError(ctx)
 	}
 }