diff options
author | Ian Bull <irbull@eclipsesource.com> | 2024-07-18 13:52:17 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-18 22:52:17 +0200 |
commit | 1722e0aebfd830b7cbc0824ace5de0517072d0dc (patch) | |
tree | d1a01a2a4ef85b522555d768d25440f01b28053e /ext/cron | |
parent | d80d0cea7c88cf498ae884882ba62181d1146485 (diff) |
fix(cron): improve error message for invalid cron names (#24644)
When a cron name is invalid, it wasn't necessarily clear why. This
change-set improves the error message to inform the user of the valid
characters in a cron name.
Diffstat (limited to 'ext/cron')
-rw-r--r-- | ext/cron/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/cron/lib.rs b/ext/cron/lib.rs index a0f1c44e1..ede01ba45 100644 --- a/ext/cron/lib.rs +++ b/ext/cron/lib.rs @@ -121,7 +121,7 @@ fn validate_cron_name(name: &str) -> Result<(), AnyError> { if !name.chars().all(|c| { c.is_ascii_whitespace() || c.is_ascii_alphanumeric() || c == '_' || c == '-' }) { - return Err(type_error("Invalid cron name")); + return Err(type_error("Invalid cron name. Only alphanumeric characters, whitespace, hyphens, and underscores are allowed")); } Ok(()) } |