From 234d5bd5a2f547ca19d7d96032a01a236d56b2fe Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 17 Apr 2019 16:42:29 -0700 Subject: [PATCH] Fixing a bug with follower view --- server/src/websocket_server/server.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/websocket_server/server.rs b/server/src/websocket_server/server.rs index c4afa696..a4c5b620 100644 --- a/server/src/websocket_server/server.rs +++ b/server/src/websocket_server/server.rs @@ -1723,7 +1723,12 @@ impl Perform for GetFollowedCommunities { let user_id = claims.id; - let communities: Vec = CommunityFollowerView::for_user(&conn, user_id).unwrap(); + let communities: Vec = match CommunityFollowerView::for_user(&conn, user_id) { + Ok(communities) => communities, + Err(_e) => { + return self.error("System error, try logging out and back in."); + } + }; // Return the jwt serde_json::to_string(