From: Dessalines Date: Mon, 26 Sep 2022 14:40:42 +0000 (-0400) Subject: Fix rate limit error messages. Fixes #2428 (#2449) X-Git-Url: http://these/git/%7BmarkdownHelpUrl%7D?a=commitdiff_plain;h=3adb29354176df727e644b74da15b75d4bb29df1;p=lemmy.git Fix rate limit error messages. Fixes #2428 (#2449) * Fix rate limit error messages. Fixes #2428 * Simplify --- diff --git a/crates/websocket/src/chat_server.rs b/crates/websocket/src/chat_server.rs index 8dcc81d1..b0dcabc9 100644 --- a/crates/websocket/src/chat_server.rs +++ b/crates/websocket/src/chat_server.rs @@ -498,8 +498,8 @@ impl ChatServer { if passed { fut.await } else { - // if rate limit was hit, respond with empty message - Ok("".to_string()) + // if rate limit was hit, respond with message + Err(LemmyError::from_message("rate_limit_error")) } } }