1
0
Fork 0
mirror of synced 2024-10-01 09:38:55 +13:00

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

View file

@ -44,7 +44,7 @@ export const _createUser = async (app, user, password = null) => {
const userErrors = validateUser(app)([...users, user], user)
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)