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:
co-authored by
GCHQDeveloper581
parent
9f87fec52d
commit
0e50d32ec5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user