bugfix: better logging on create user error

This commit is contained in:
Michael Shanks 2020-03-28 06:40:01 +00:00
parent 946c79df53
commit fbfca2370b
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ export const _createUser = async (app, user, password = null) => {
const userErrors = validateUser(app)([...users, user], user) const userErrors = validateUser(app)([...users, user], user)
if (userErrors.length > 0) { if (userErrors.length > 0) {
throw new BadRequestError(`User is invalid. ${join("; ")(userErrors)}`) throw new BadRequestError(`User is invalid. ${join("; ")(userErrors.map(e => e.error))}`)
} }
const { auth, tempCode, temporaryAccessId } = await getAccess(app, password) const { auth, tempCode, temporaryAccessId } = await getAccess(app, password)