Skip to content

Commit

Permalink
Better error on creating users
Browse files Browse the repository at this point in the history
Signed-off-by: Ruben <vandervalk@geoit.nl>
  • Loading branch information
Ruben authored and RubenGeo committed Dec 5, 2024
1 parent ba70a8d commit c489256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/121-service/src/user/user.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export class UserService {
const user = await qb.getOne();

if (user) {
const errors = { username: 'Username must be unique.' };
const errors = { username: `Username: '${username}' must be unique.` };
throw new HttpException(
{ message: 'Input data validation failed', errors },
HttpStatus.BAD_REQUEST,
Expand Down

0 comments on commit c489256

Please sign in to comment.