diff --git a/crates/api_clients/artcraft/artcraft_router/src/errors/client_error.rs b/crates/api_clients/artcraft/artcraft_router/src/errors/client_error.rs index d61872c840..0b981751aa 100644 --- a/crates/api_clients/artcraft/artcraft_router/src/errors/client_error.rs +++ b/crates/api_clients/artcraft/artcraft_router/src/errors/client_error.rs @@ -24,6 +24,9 @@ impl Display for ClientType { #[derive(Debug)] pub enum ClientError { + /// A RouterClient was required but not provided on the draft context. + RouterClientNotProvided, + /// The requested client is not configured on the RouterClient. ClientNotConfigured(ClientType), @@ -57,9 +60,6 @@ pub enum ClientError { /// A character token was not found in the provided character-token-to-id map CharacterTokenNotFoundInMap { token: CharacterToken }, - - /// A RouterClient was required but not provided on the draft context. - RouterClientNotProvided, } impl Error for ClientError {} @@ -67,6 +67,9 @@ impl Error for ClientError {} impl Display for ClientError { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self { + Self::RouterClientNotProvided => { + write!(f, "A RouterClient is required but was not provided on the draft context") + } Self::ClientNotConfigured(client_type) => { write!(f, "{} client is not configured on the RouterClient", client_type) } @@ -100,9 +103,6 @@ impl Display for ClientError { Self::CharacterTokenNotFoundInMap { token } => { write!(f, "Character token '{}' was not found in the provided character-token-to-id map", token.as_str()) } - Self::RouterClientNotProvided => { - write!(f, "A RouterClient is required but was not provided on the draft context") - } } } }