Fix stale presenter after expected operation errors (#2589)

Co-authored-by: GCHQDeveloper581 <63102987+GCHQDeveloper581@users.noreply.github.com> (tweaked tests)
This commit is contained in:
Zain Nadeem
2026-06-24 16:39:01 +00:00
committed by GitHub
co-authored by GCHQDeveloper581
parent 9f87fec52d
commit 0e50d32ec5
2 changed files with 20 additions and 0 deletions
+2
View File
@@ -241,9 +241,11 @@ class Recipe {
// Cannot rely on `err instanceof OperationError` here as extending
// native types is not fully supported yet.
dish.set(err.message, "string");
this.lastRunOp = null;
return i;
} else if (err instanceof DishError || err?.type === "DishError") {
dish.set(err.message, "string");
this.lastRunOp = null;
return i;
} else {
const e = typeof err == "string" ? { message: err } : err;