aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/utils.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index cd1b3d69..5674f2fc 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -22,6 +22,7 @@ getUser = async (username, transaction) => {
}
let user = await db.User.findOne(params);
+ if (!user) throw new Error("User not found");
user = user.get({ plain: true });