fix: log internal errors server-side, add timeout to GDPR goroutine

This commit is contained in:
2026-07-11 16:09:11 +01:00
parent 05c5d73d30
commit 0c1fc2b819
18 changed files with 112 additions and 54 deletions
+3 -1
View File
@@ -10,6 +10,7 @@ import (
"encoding/json"
"errors"
"github.com/jackc/pgx/v5"
"log"
"log/slog"
"net/http"
"time"
@@ -104,7 +105,8 @@ func CreateServiceHandler(w http.ResponseWriter, r *http.Request) {
return
}
if err := validators.Validate.Struct(&req); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
log.Printf("Failed to process request: %v", err)
http.Error(w, "Invalid request", http.StatusBadRequest)
return
}