File tree Expand file tree Collapse file tree 5 files changed +24
-0
lines changed Expand file tree Collapse file tree 5 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @trigger.dev/core " : patch
3+ ---
4+
5+ Add outdated SDK error
Original file line number Diff line number Diff line change 44 ProdTaskRunExecution ,
55 ProdTaskRunExecutionPayload ,
66 TaskRunError ,
7+ TaskRunErrorCodes ,
78 TaskRunExecution ,
89 TaskRunExecutionLazyAttemptPayload ,
910 TaskRunExecutionResult ,
@@ -519,6 +520,11 @@ export class SharedQueueConsumer {
519520 taskRun : lockedTaskRun . id ,
520521 } ) ;
521522
523+ const service = new CrashTaskRunService ( ) ;
524+ await service . call ( lockedTaskRun . id , {
525+ errorCode : TaskRunErrorCodes . OUTDATED_SDK_VERSION ,
526+ } ) ;
527+
522528 await this . #ackAndDoMoreWork( message . messageId ) ;
523529 return ;
524530 }
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ export function shouldRetryError(error: TaskRunError): boolean {
167167 case "MAX_DURATION_EXCEEDED" :
168168 case "DISK_SPACE_EXCEEDED" :
169169 case "TASK_RUN_HEARTBEAT_TIMEOUT" :
170+ case "OUTDATED_SDK_VERSION" :
170171 return false ;
171172
172173 case "GRACEFUL_EXIT_TIMEOUT" :
@@ -428,6 +429,14 @@ const prettyInternalErrors: Partial<
428429 magic : "CONTACT_FORM" ,
429430 } ,
430431 } ,
432+ OUTDATED_SDK_VERSION : {
433+ message :
434+ "Your task is using an outdated version of the SDK. Please upgrade to the latest version." ,
435+ link : {
436+ name : "Beta upgrade guide" ,
437+ href : links . docs . upgrade . beta ,
438+ } ,
439+ } ,
431440} ;
432441
433442const getPrettyTaskRunError = ( code : TaskRunInternalError [ "code" ] ) : TaskRunInternalError => {
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ export const links = {
99 machines : {
1010 home : "https://trigger.dev/docs/v3/machines" ,
1111 } ,
12+ upgrade : {
13+ beta : "https://trigger.dev/docs/upgrading-beta" ,
14+ } ,
1215 } ,
1316 site : {
1417 home : "https://trigger.dev" ,
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export const TaskRunInternalError = z.object({
104104 "DISK_SPACE_EXCEEDED" ,
105105 "POD_EVICTED" ,
106106 "POD_UNKNOWN_ERROR" ,
107+ "OUTDATED_SDK_VERSION" ,
107108 ] ) ,
108109 message : z . string ( ) . optional ( ) ,
109110 stackTrace : z . string ( ) . optional ( ) ,
You can’t perform that action at this time.
0 commit comments