From 7645411bcf7201e3a4927566da78080dc6a84ccf Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Tue, 1 Oct 2024 20:32:57 -0400 Subject: Prevent racing between `limit_stream` and logging out. --- src/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 6e797b4..8792a1d 100644 --- a/src/error.rs +++ b/src/error.rs @@ -61,3 +61,11 @@ impl fmt::Display for Id { self.0.fmt(f) } } + +pub struct Unauthorized; + +impl IntoResponse for Unauthorized { + fn into_response(self) -> Response { + (StatusCode::UNAUTHORIZED, "unauthorized").into_response() + } +} -- cgit v1.2.3