File tree Expand file tree Collapse file tree
internal-packages/run-engine/src/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,3 +104,10 @@ export class RunOneTimeUseTokenError extends Error {
104104 this . name = "RunOneTimeUseTokenError" ;
105105 }
106106}
107+
108+ export class ExecutionSnapshotNotFoundError extends Error {
109+ constructor ( public readonly snapshotId : string ) {
110+ super ( `No execution snapshot found for id ${ snapshotId } ` ) ;
111+ this . name = "ExecutionSnapshotNotFoundError" ;
112+ }
113+ }
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010 TaskRunStatus ,
1111 Waitpoint ,
1212} from "@trigger.dev/database" ;
13+ import { ExecutionSnapshotNotFoundError } from "../errors.js" ;
1314import { HeartbeatTimeouts } from "../types.js" ;
1415import { SystemResources } from "./systems.js" ;
1516
@@ -278,7 +279,7 @@ export async function getExecutionSnapshotsSince(
278279 } ) ;
279280
280281 if ( ! sinceSnapshot ) {
281- throw new Error ( `No execution snapshot found for id ${ sinceSnapshotId } ` ) ;
282+ throw new ExecutionSnapshotNotFoundError ( sinceSnapshotId ) ;
282283 }
283284
284285 // Step 2: Fetch snapshots WITHOUT waitpoints to avoid N×M data explosion
You can’t perform that action at this time.
0 commit comments