@@ -44,7 +44,10 @@ use database::{
44
44
Database ,
45
45
Transaction ,
46
46
} ;
47
- use errors:: ErrorMetadataAnyhowExt ;
47
+ use errors:: {
48
+ ErrorMetadata ,
49
+ ErrorMetadataAnyhowExt ,
50
+ } ;
48
51
use fastrace:: future:: FutureExt as _;
49
52
use futures:: {
50
53
future:: Either ,
@@ -763,10 +766,10 @@ impl<RT: Runtime> CronJobContext<RT> {
763
766
next_ts = compute_next_ts ( & job. cron_spec , Some ( next_ts) , now) ?;
764
767
}
765
768
if num_skipped > 0 {
766
- let name = & job. name ;
769
+ let job_id = job. id . developer_id ;
767
770
tracing:: info!(
768
- "Skipping {num_skipped} run(s) of {name } because multiple scheduled runs are in \
769
- the past"
771
+ "Skipping {num_skipped} run(s) of job {job_id } because multiple scheduled runs \
772
+ are in the past"
770
773
) ;
771
774
match udf_type {
772
775
// These aren't system errors in the sense that they represent an issue with Convex
@@ -776,10 +779,13 @@ impl<RT: Runtime> CronJobContext<RT> {
776
779
UdfType :: Mutation => {
777
780
self . function_log
778
781
. log_mutation_system_error (
779
- & anyhow:: anyhow!(
780
- "Skipping {num_skipped} run(s) of {name} because multiple \
781
- scheduled runs are in the past"
782
- ) ,
782
+ & anyhow:: anyhow!( ErrorMetadata :: bad_request(
783
+ "SkippingPastScheduledRuns" ,
784
+ format!(
785
+ "Skipping {num_skipped} run(s) of job {job_id} because \
786
+ multiple scheduled runs are in the past"
787
+ )
788
+ ) ) ,
783
789
CanonicalizedComponentFunctionPath {
784
790
component : component_path,
785
791
udf_path : job. cron_spec . udf_path . clone ( ) ,
@@ -800,10 +806,13 @@ impl<RT: Runtime> CronJobContext<RT> {
800
806
mutation_retry_count. is_none( ) ,
801
807
"Actions should not have mutation_retry_count set"
802
808
) ;
803
- let mut err = anyhow:: anyhow!(
804
- "Skipping {num_skipped} run(s) of {name} because multiple scheduled runs \
805
- are in the past"
806
- ) ;
809
+ let mut err = anyhow:: anyhow!( ErrorMetadata :: bad_request(
810
+ "SkippingPastScheduledRuns" ,
811
+ format!(
812
+ "Skipping {num_skipped} run(s) of job {job_id} because multiple \
813
+ scheduled runs are in the past"
814
+ )
815
+ ) ) ;
807
816
self . function_log
808
817
. log_action_system_error (
809
818
& err,
0 commit comments