diff --git a/internal/server/error_handler.go b/internal/server/error_handler.go index 0d7c2c18..e5b595e2 100644 --- a/internal/server/error_handler.go +++ b/internal/server/error_handler.go @@ -15,14 +15,14 @@ func autheliaErrorHandler(ctx *fasthttp.RequestCtx, err error) { if _, ok := err.(*fasthttp.ErrSmallBuffer); ok { // Note: Getting X-Forwarded-For or Request URI is impossible for ths error. logger.Tracef("Request was too large to handle from client %s. Response Code %d.", ctx.RemoteIP().String(), fasthttp.StatusRequestHeaderFieldsTooLarge) - ctx.Error("Request header too large", fasthttp.StatusRequestHeaderFieldsTooLarge) + ctx.Error("request header too large", fasthttp.StatusRequestHeaderFieldsTooLarge) } else if netErr, ok := err.(*net.OpError); ok && netErr.Timeout() { // TODO: Add X-Forwarded-For Check here. logger.Tracef("Request timeout occurred while handling from client %s: %s. Response Code %d.", ctx.RemoteIP().String(), ctx.RequestURI(), fasthttp.StatusRequestTimeout) - ctx.Error("Request timeout", fasthttp.StatusRequestTimeout) + ctx.Error("request timeout", fasthttp.StatusRequestTimeout) } else { // TODO: Add X-Forwarded-For Check here. logger.Tracef("An unknown error occurred while handling a request from client %s: %s. Response Code %d.", ctx.RemoteIP().String(), ctx.RequestURI(), fasthttp.StatusBadRequest) - ctx.Error("Error when parsing request", fasthttp.StatusBadRequest) + ctx.Error("error when parsing request", fasthttp.StatusBadRequest) } } diff --git a/internal/server/template.go b/internal/server/template.go index f80dac52..1c65fb55 100644 --- a/internal/server/template.go +++ b/internal/server/template.go @@ -57,7 +57,7 @@ func ServeTemplatedFile(publicDir, file, base, rememberMe, resetPassword, sessio err := tmpl.Execute(ctx.Response.BodyWriter(), struct{ Base, CSPNonce, RememberMe, ResetPassword, Session, Theme string }{Base: base, CSPNonce: nonce, RememberMe: rememberMe, ResetPassword: resetPassword, Session: session, Theme: theme}) if err != nil { - ctx.Error("An error occurred", 503) + ctx.Error("an error occurred", 503) logger.Errorf("Unable to execute template: %v", err) return