|
|
@@ -39,6 +39,7 @@ func writeError(w http.ResponseWriter, status int, msg string, err error) {
|
|
|
func writeValidationError(w http.ResponseWriter, err error) {
|
|
|
details := err.Error()
|
|
|
if AppEnv == "production" {
|
|
|
+ slog.Error("validation error", "error", details)
|
|
|
details = "validation failed"
|
|
|
}
|
|
|
writeJSON(w, http.StatusUnprocessableEntity, map[string]interface{}{
|