We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e72a7c1 commit 9f568b7Copy full SHA for 9f568b7
src/lib/types/user.ts
@@ -90,7 +90,15 @@ export default class User implements IUser {
90
if (!id) {
91
throw new ValidationError('Id is required', [], undefined);
92
}
93
- Joi.assert(email, Joi.string().email({ ignoreLength: true }), 'Email');
+ try {
94
+ Joi.assert(
95
+ email,
96
+ Joi.string().email({ ignoreLength: true }),
97
+ 'Email',
98
+ );
99
+ } catch (e) {
100
+ console.error('Invalid email', email, e);
101
+ }
102
Joi.assert(username, Joi.string(), 'Username');
103
Joi.assert(name, Joi.string(), 'Name');
104
0 commit comments