Skip to content

Commit

Permalink
revert timestamp validation
Browse files Browse the repository at this point in the history
  • Loading branch information
korotkov-aerospike committed Jan 28, 2025
1 parent f0672d5 commit 5185072
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/dto/time_bounds.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package dto

import (
"errors"
"fmt"
"strconv"
"time"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5185072

Please sign in to comment.