Fix 500 error when account token does not resolve to account

This commit is contained in:
Ben Gotow 2016-06-30 12:32:19 -07:00
parent d0666540b9
commit f9952f9fa7

View file

@ -51,7 +51,7 @@ const validate = (request, username, password, callback) => {
}
token.getAccount().then((account) => {
if (!account) {
callback(new Error("Could not find Account referenced by AccountToken"), false, {});
callback(null, false, {});
return;
}
SchedulerUtils.notifyAccountIsActive(account.id)