From: Dessalines Date: Wed, 17 Apr 2019 23:42:29 +0000 (-0700) Subject: Fixing a bug with follower view X-Git-Url: http://these/git/%22https:/nerdica.net/%7B%60%24%7BwebArchiveUrl%7D/save/%7B%60%24%7BarchiveTodayUrl%7D/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=c725b7a09b0019e996f0e68b468a9cf13641c816;p=lemmy.git Fixing a bug with follower view --- 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(