mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
ESM: Fixed OperationError detection and tidied up ops.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user