Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Nu-7476] Add more info about failed deployment due to wrong cron configuration #7479

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions designer/client/src/http/HttpService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,13 @@ class HttpService {
.then(() => {
return { isSuccess: true };
})
.catch((error) => {
.catch((error: AxiosError) => {
if (error?.response?.status != 400) {
return this.#addError(
i18next.t("notification.error.failedToDeploy", "Failed to deploy {{processName}}", { processName }),
i18next.t("notification.error.failedToDeploy", "Failed to deploy {{processName}} due to: {{axiosError}}", {
processName,
axiosError: handleAxiosError(error),
}),
error,
true,
).then(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,12 @@ 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 the scheduled date. It seems that a date from the past was configured in the CRON configuration."
)
case correctSchedules => correctSchedules
}).left.map(new PeriodicProcessException(_))
}

Expand Down
Loading