From cdef00f84442fc643c9e6afad148e98dc70bfbde Mon Sep 17 00:00:00 2001 From: asonix Date: Wed, 18 Mar 2020 12:47:02 -0500 Subject: [PATCH] Add custom response status for not subscribed --- src/error.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/error.rs b/src/error.rs index 6436b3d..1e2f4b8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -85,6 +85,7 @@ impl ResponseError for MyError { | MyError::Whitelist(_) | MyError::WrongActor(_) | MyError::BadActor(_, _) => StatusCode::FORBIDDEN, + MyError::NotSubscribed(_) => StatusCode::UNAUTHORIZED, MyError::Duplicate => StatusCode::ACCEPTED, MyError::Kind(_) => StatusCode::BAD_REQUEST, _ => StatusCode::INTERNAL_SERVER_ERROR,