diff --git a/designer/client/src/devHelpers.ts b/designer/client/src/devHelpers.ts index 5790c328dd3..2b3480287fd 100644 --- a/designer/client/src/devHelpers.ts +++ b/designer/client/src/devHelpers.ts @@ -15,7 +15,11 @@ export function withLogs(fn: (...args: A) => R, message? export function handleAxiosError(error: AxiosError): string { if (error.response?.data && typeof error.response.data === "string") { - return error.response.data; + if (error.response.data.startsWith("No future date determined by CronScheduleProperty")) { + return i18next.t("errors.axiosError.scheduledCron", "problem with scheduled date"); + } else { + return error.response.data; + } } const httpStatusCode = error.response?.status; diff --git a/designer/client/src/http/HttpService.ts b/designer/client/src/http/HttpService.ts index 9fcf4cdadc6..3759f6fb9b4 100644 --- a/designer/client/src/http/HttpService.ts +++ b/designer/client/src/http/HttpService.ts @@ -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(() => {