From b83c10661b523550b0773e3e1ad475aa267d7629 Mon Sep 17 00:00:00 2001 From: Gabriel Gordon-Hall Date: Fri, 15 Dec 2023 11:06:14 +0000 Subject: [PATCH] add additional llm_gateway error types --- server/bleep/src/llm_gateway.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/bleep/src/llm_gateway.rs b/server/bleep/src/llm_gateway.rs index 6b45f9dffa..a1597fc405 100644 --- a/server/bleep/src/llm_gateway.rs +++ b/server/bleep/src/llm_gateway.rs @@ -112,6 +112,21 @@ pub mod api { #[error("incorrect configuration")] BadConfiguration, + + #[error("failed to call quota API")] + QuotaCallFailed, + + #[error("exceeded quota")] + ExceededQuota, + + #[error("quota API was not set")] + QuotaApiNotSet, + + #[error("called quota API with no authorization")] + UnauthorizedQuotaCall, + + #[error("waiting for the next token took longer than allowed")] + TokenDelayTooLarge, } pub type Result = std::result::Result;