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 4
4
ProdTaskRunExecution ,
5
5
ProdTaskRunExecutionPayload ,
6
6
TaskRunError ,
7
+ TaskRunErrorCodes ,
7
8
TaskRunExecution ,
8
9
TaskRunExecutionLazyAttemptPayload ,
9
10
TaskRunExecutionResult ,
@@ -519,6 +520,11 @@ export class SharedQueueConsumer {
519
520
taskRun : lockedTaskRun . id ,
520
521
} ) ;
521
522
523
+ const service = new CrashTaskRunService ( ) ;
524
+ await service . call ( lockedTaskRun . id , {
525
+ errorCode : TaskRunErrorCodes . OUTDATED_SDK_VERSION ,
526
+ } ) ;
527
+
522
528
await this . #ackAndDoMoreWork( message . messageId ) ;
523
529
return ;
524
530
}
Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ export function shouldRetryError(error: TaskRunError): boolean {
167
167
case "MAX_DURATION_EXCEEDED" :
168
168
case "DISK_SPACE_EXCEEDED" :
169
169
case "TASK_RUN_HEARTBEAT_TIMEOUT" :
170
+ case "OUTDATED_SDK_VERSION" :
170
171
return false ;
171
172
172
173
case "GRACEFUL_EXIT_TIMEOUT" :
@@ -428,6 +429,14 @@ const prettyInternalErrors: Partial<
428
429
magic : "CONTACT_FORM" ,
429
430
} ,
430
431
} ,
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
+ } ,
431
440
} ;
432
441
433
442
const getPrettyTaskRunError = ( code : TaskRunInternalError [ "code" ] ) : TaskRunInternalError => {
Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ export const links = {
9
9
machines : {
10
10
home : "https://trigger.dev/docs/v3/machines" ,
11
11
} ,
12
+ upgrade : {
13
+ beta : "https://trigger.dev/docs/upgrading-beta" ,
14
+ } ,
12
15
} ,
13
16
site : {
14
17
home : "https://trigger.dev" ,
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ export const TaskRunInternalError = z.object({
104
104
"DISK_SPACE_EXCEEDED" ,
105
105
"POD_EVICTED" ,
106
106
"POD_UNKNOWN_ERROR" ,
107
+ "OUTDATED_SDK_VERSION" ,
107
108
] ) ,
108
109
message : z . string ( ) . optional ( ) ,
109
110
stackTrace : z . string ( ) . optional ( ) ,
You can’t perform that action at this time.
0 commit comments