elsa-workflows / elsa-workflows/elsa-studio
Cron Activity with wrong expression crashed the Elsa Studio
- Dominant language
- C#
- Stars
- 301
- Forks
- 181
- Avg merge
- 17h 12m
- Merged PRs (30d)
- 42
Description
## Description
I am trying to create a workflow which start with a Cron Job (9pm of every 26th of the month) using Elsa Studio (3.7.0),
When I publish, it crashes with `ApiException: Response status code does not indicate success: 400 (Bad Request).
`
Without Cron activity, the workflow gets published without any issue
## Steps to Reproduce
When click to Publish button after adding the Cron activity (* 21 26 * * ?) Or (* 21 26 * *)
1. **Detailed Steps**:
- Created HttpRequest (GET)
- Tested the request, it works fine
- Add Cron activity before HttpRequest
- Save the workflow
- Publish workflow
2. **Reproduction Rate**:
Every time
3. **Video/Screenshots**:
## Expected Behavior
Publish the workflow and show the success message
## Actual Behavior
Esla Studio crashed with error
`ApiException: Response status code does not indicate success: 400 (Bad Request).`
## Screenshots
## Environment
- **Elsa Package Version**: 3.7
- **Operating System**: Windows 11 (Enterprise).
- **Browser and Version**: Edge Version 149.0.4022.62
## Additional Context
Response from DevTools (Network > Http call response)
`
{
"statusCode": 400,
"message": "One or more errors occurred!",
"errors": {
"generalErrors": [
"Error when parsing cron expression: The given cron expression has an invalid format. Hours: Value must be a number between 0 and 23 (all inclusive)."
]
}
}
`
Contributor guide
Research direction
Start by reproducing the failure in Elsa Studio 3.7.0: add a Cron activity before the HttpRequest and publish using the expressions shown in the issue. Inspect the Publish request in DevTools Network and trace the returned cron-validation error. Done means the workflow publishes successfully, or the invalid expression receives a clear validation message without crashing the Studio.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100