Skip to content

Commit

Permalink
Better BE errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Rudnicki committed Jan 22, 2025
1 parent 2806327 commit 2d102f5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@ class PeriodicProcessService(
case e: SingleScheduleProperty => e.nextRunAt(clock).map(t => List((ScheduleName(None), t)))
}
(schedules match {
case Left(error) => Left(s"Failed to parse periodic property: $error")
case Right(scheduleDates) if scheduleDates.forall(_._2.isEmpty) => Left(s"No future date determined by $schedule")
case correctSchedules => correctSchedules
case Left(error) => Left(s"Problem with parsing periodic property: $error")
case Right(scheduleDates) if scheduleDates.forall(_._2.isEmpty) =>
Left(s"Problem with scheduled date. Probably date from the past was configured in CRON configuration")
case correctSchedules => correctSchedules
}).left.map(new PeriodicProcessException(_))
}

Expand Down

0 comments on commit 2d102f5

Please sign in to comment.