From 3adb29354176df727e644b74da15b75d4bb29df1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 26 Sep 2022 10:40:42 -0400 Subject: [PATCH] Fix rate limit error messages. Fixes #2428 (#2449) * Fix rate limit error messages. Fixes #2428 * Simplify --- crates/websocket/src/chat_server.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")) } } } -- 2.44.1