added error logging
All checks were successful
build and deploy kleinTodo / build (push) Successful in 11s

This commit is contained in:
Darius klein 2025-07-26 23:57:44 +02:00
parent 4a402c5f8d
commit 298c5bbaeb

View File

@ -2,6 +2,7 @@ package handler
import (
"log"
"log/slog"
"net/http"
)
@ -22,7 +23,6 @@ func UnprocessableEntityHandler(w http.ResponseWriter, err error) {
}
func UnauthorizedHandler(w http.ResponseWriter) {
log.Println("unauthorized")
setError(w, http.StatusUnauthorized, "Unauthorized")
}
@ -56,6 +56,7 @@ func handleError(w http.ResponseWriter, status int, err error) bool {
default:
InternalServerErrorHandler(w, err)
}
slog.Error(err.Error())
return true
}
return false