mirror of
https://github.com/gchq/CyberChef
synced 2025-12-05 23:53:27 +00:00
ESM: Changed thrown errors to OperationErrors
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
import Operation from "../Operation";
|
||||
import OperationError from "../errors/OperationError";
|
||||
import bcrypt from "bcryptjs";
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,7 @@ Salt: ${bcrypt.getSalt(input)}
|
||||
Password hash: ${input.split(bcrypt.getSalt(input))[1]}
|
||||
Full hash: ${input}`;
|
||||
} catch (err) {
|
||||
return "Error: " + err.toString();
|
||||
throw new OperationError("Error: " + err.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user