From 5185072fe6c50fc9cd05d7dcf6d465fbd5083350 Mon Sep 17 00:00:00 2001 From: akorotkov Date: Tue, 28 Jan 2025 18:08:48 +0200 Subject: [PATCH] revert timestamp validation --- pkg/dto/time_bounds.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/dto/time_bounds.go b/pkg/dto/time_bounds.go index 416da898..4263d0be 100644 --- a/pkg/dto/time_bounds.go +++ b/pkg/dto/time_bounds.go @@ -2,6 +2,7 @@ package dto import ( "errors" + "fmt" "strconv" "time" @@ -57,7 +58,7 @@ func parseTimestamp(value string) (*time.Time, error) { } if intValue < 0 { - return nil, errValidationNonPositive("timestamp", intValue) + return nil, fmt.Errorf("timestamp should be positive or zero, got %d", intValue) } return util.Ptr(time.UnixMilli(intValue)), nil