diff --git a/lib/utils/validator.js b/lib/utils/validator.js index 5a45c88d..147e4a69 100644 --- a/lib/utils/validator.js +++ b/lib/utils/validator.js @@ -279,9 +279,9 @@ Validator.prototype.hash = function hash(key, fallback) { if (typeof value !== 'string') { if (!Buffer.isBuffer(value)) - throw new Error(fmt(key) + ' must be a buffer.'); + throw new Error(fmt(key) + ' must be a hash.'); if (value.length !== 32) - throw new Error(fmt(key) + ' must be a buffer.'); + throw new Error(fmt(key) + ' must be a hash.'); return value.toString('hex'); }