changeset 4830:125cac3c977d

Don't reflect bad input back to client in availability controller.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Nov 2019 18:18:10 +0100
parents f4ec3558460e
children 5062ccb2381d
files pkg/controllers/bottlenecks.go
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/bottlenecks.go	Wed Nov 06 18:00:50 2019 +0100
+++ b/pkg/controllers/bottlenecks.go	Wed Nov 06 18:18:10 2019 +0100
@@ -299,7 +299,7 @@
 	v, err := common.ParseTime(f)
 	if err != nil {
 		http.Error(
-			rw, fmt.Sprintf("Invalid format for '%s': %v.", field, err),
+			rw, fmt.Sprintf("Invalid format for '%s'.", field),
 			http.StatusBadRequest,
 		)
 		return time.Time{}, false
@@ -320,7 +320,7 @@
 	v, err := strconv.Atoi(f)
 	if err != nil {
 		http.Error(
-			rw, fmt.Sprintf("Invalid format for '%s': %v.", field, err),
+			rw, fmt.Sprintf("Invalid format for '%s'.", field),
 			http.StatusBadRequest,
 		)
 		return 0, false