@@ -13,8 +13,8 @@ import {
13
13
import { WorkerGroupService } from "~/v3/services/worker/workerGroupService.server" ;
14
14
import type { RunEngine } from "~/v3/runEngine.server" ;
15
15
import { env } from "~/env.server" ;
16
- import { EngineServiceValidationError } from "./errors" ;
17
16
import { tryCatch } from "@trigger.dev/core/v3" ;
17
+ import { ServiceValidationError } from "~/v3/services/common.server" ;
18
18
19
19
export class DefaultQueueManager implements QueueManager {
20
20
constructor (
@@ -45,7 +45,7 @@ export class DefaultQueueManager implements QueueManager {
45
45
} ) ;
46
46
47
47
if ( ! specifiedQueue ) {
48
- throw new EngineServiceValidationError (
48
+ throw new ServiceValidationError (
49
49
`Specified queue '${ specifiedQueueName } ' not found or not associated with locked version '${
50
50
lockedBackgroundWorker . version ?? "<unknown>"
51
51
} '.`
@@ -68,7 +68,7 @@ export class DefaultQueueManager implements QueueManager {
68
68
} ) ;
69
69
70
70
if ( ! lockedTask ) {
71
- throw new EngineServiceValidationError (
71
+ throw new ServiceValidationError (
72
72
`Task '${ request . taskId } ' not found on locked version '${
73
73
lockedBackgroundWorker . version ?? "<unknown>"
74
74
} '.`
@@ -83,7 +83,7 @@ export class DefaultQueueManager implements QueueManager {
83
83
workerId : lockedBackgroundWorker . id ,
84
84
version : lockedBackgroundWorker . version ,
85
85
} ) ;
86
- throw new EngineServiceValidationError (
86
+ throw new ServiceValidationError (
87
87
`Default queue configuration for task '${ request . taskId } ' missing on locked version '${
88
88
lockedBackgroundWorker . version ?? "<unknown>"
89
89
} '.`
@@ -97,7 +97,7 @@ export class DefaultQueueManager implements QueueManager {
97
97
// Task is not locked to a specific version, use regular logic
98
98
if ( request . body . options ?. lockToVersion ) {
99
99
// This should only happen if the findFirst failed, indicating the version doesn't exist
100
- throw new EngineServiceValidationError (
100
+ throw new ServiceValidationError (
101
101
`Task locked to version '${ request . body . options . lockToVersion } ', but no worker found with that version.`
102
102
) ;
103
103
}
@@ -221,11 +221,11 @@ export class DefaultQueueManager implements QueueManager {
221
221
) ;
222
222
223
223
if ( error ) {
224
- throw new EngineServiceValidationError ( error . message ) ;
224
+ throw new ServiceValidationError ( error . message ) ;
225
225
}
226
226
227
227
if ( ! workerGroup ) {
228
- throw new EngineServiceValidationError ( "No worker group found" ) ;
228
+ throw new ServiceValidationError ( "No worker group found" ) ;
229
229
}
230
230
231
231
return workerGroup . masterQueue ;
0 commit comments