{“用户验证失败:密码:在路径\“密码\”处,值\“Promise {<pending>}\”(类型Promise)转换为字符串失败”}

问题描述 投票:0回答:0

当我尝试从邮递员创建用户时,总是出现错误: { "message": "用户验证失败:密码:在路径“password”处,对于值“Promise { }”(类型 Promise),转换为字符串失败” }

终端: C:\Users\Asus\Documents\GitHub\users ode_modules cryptjs\dist crypt.js:214 nextTick(callback.bind(this, Error("非法参数:"+(typeof s)+', '+(typeof salt)))); ^

错误:非法参数:未定义,数字 在 _async (C:\Users\Asus\Documents\GitHub\users ode_modules cryptjs\dist crypt.js:214:46)
在 C:\Users\Asus\Documents\GitHub\users ode_modules cryptjs\dist crypt.js:223:17 在新的承诺 () 在 Object.bcrypt.hash (C:\Users\Asus\Documents\GitHub\users ode_modules cryptjs\dist crypt.js:222:20) 在generateHashPassword (C:\Users\Asus\Documents\GitHub\users\src\helpers\securePassword.js:5:25) 在 addUser (C:\Users\Asus\Documents\GitHub\users\sr

error-handling path postman passwords password-hash
© www.soinside.com 2019 - 2024. All rights reserved.