We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbccc3b commit bf06587Copy full SHA for bf06587
src/users/users.service.ts
@@ -32,11 +32,8 @@ export class UsersService {
32
33
return new UserLoginResponseDto(userData, null);
34
} catch (err) {
35
- if (err.original.constraint === 'user_email_key') {
36
- throw new HttpException(`User with email '${err.errors[0].value}' already exists`, HttpStatus.CONFLICT);
37
- }
38
39
- throw new HttpException(err, HttpStatus.INTERNAL_SERVER_ERROR);
+ throw new HttpException(err.message, HttpStatus.INTERNAL_SERVER_ERROR);
40
}
41
42
0 commit comments