Email not found error returned correctyl
This commit is contained in:
parent
2f4bd04ab3
commit
7031bb1d48
@ -34,17 +34,10 @@ export default class UserController extends ApiController {
|
||||
return;
|
||||
}
|
||||
|
||||
let user;
|
||||
|
||||
try {
|
||||
user = await this.idNotService.getOrCreateUser(idNotToken);
|
||||
} catch (error: any) {
|
||||
this.httpUnauthorized(error);
|
||||
return;
|
||||
}
|
||||
const user = await this.idNotService.getOrCreateUser(idNotToken);
|
||||
|
||||
if(!user) {
|
||||
this.httpUnauthorized(response);
|
||||
this.httpUnauthorized(response, "Email not found");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -361,7 +361,7 @@ export default class IdNotService extends BaseService {
|
||||
};
|
||||
|
||||
if(!userToAdd.contact.email) {
|
||||
throw new Error("No email found");
|
||||
return null;
|
||||
}
|
||||
|
||||
let userHydrated = User.hydrate<User>(userToAdd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user