Skip to content

Commit

Permalink
Mark invalid duration as downstream error (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
idastambuk authored Sep 23, 2024
1 parent 92f7dc7 commit dffaaeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/gtime/gtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var dateUnitPattern = regexp.MustCompile(`^(\d+)([dwMy])$`)
func ParseInterval(inp string) (time.Duration, error) {
dur, period, err := parse(inp)
if err != nil {
return 0, err
return 0, errorsource.DownstreamError(err, false)
}
if period == "" {
return dur, nil
Expand Down

0 comments on commit dffaaeb

Please sign in to comment.