diff --git a/backend/src/workspaces/preprocessing-state.ts b/backend/src/workspaces/preprocessing-state.ts index 95ee6cd3..d7d52f13 100644 --- a/backend/src/workspaces/preprocessing-state.ts +++ b/backend/src/workspaces/preprocessing-state.ts @@ -282,7 +282,13 @@ export class PreprocessingStateStore { } catch (error) { if ((error as NodeJS.ErrnoException).code !== "ENOENT") { if (error instanceof PreprocessingStateError) throw error; - if (options.runId) throw error; + throw error; + } + if (options.runId) { + throw new PreprocessingStateError( + "preprocessing_resume_mismatch", + "Workspace preprocessing run is unavailable", + ); } } const job: PreprocessingJobState = {