mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-21 07:16:17 -04:00
ESM: Fixed OperationError detection and tidied up ops.
This commit is contained in:
parent
acb8a342a7
commit
b760c2f1a0
17 changed files with 2134 additions and 2122 deletions
|
@ -177,7 +177,10 @@ class Recipe {
|
|||
}
|
||||
} catch (err) {
|
||||
// Return expected errors as output
|
||||
if (err instanceof OperationError) {
|
||||
if (err instanceof OperationError ||
|
||||
(err.type && err.type === "OperationError")) {
|
||||
// Cannot rely on `err instanceof OperationError` here as extending
|
||||
// native types is not fully supported yet.
|
||||
dish.set(err.message, "string");
|
||||
return i;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue