pub struct GroupAuthorizationError { /* private fields */ }Expand description
Group authorization failure with the group ID.
Error code Errors::GroupAuthorizationFailed. Java extends chain:
GroupAuthorizationException -> AuthorizationException -> InvalidConfigurationException ->
ApiException -> KafkaException. Fatal per common::requests::request_utils::is_fatal_error.
Implementations§
Source§impl GroupAuthorizationError
impl GroupAuthorizationError
Sourcepub fn for_group_id(group_id: impl Into<String>) -> Self
pub fn for_group_id(group_id: impl Into<String>) -> Self
Creates a group authorization error for a group ID, with the message
"Not authorized to access group: <group_id>".
§Arguments
group_id- the group ID that failed authorization
Sourcepub fn with_default_message() -> Self
pub fn with_default_message() -> Self
Creates a group authorization error with the default message of
Errors::GroupAuthorizationFailed and no group ID, as the broker’s error code is turned
into an error.
Sourcepub fn new(message: impl Into<String>) -> Self
pub fn new(message: impl Into<String>) -> Self
Creates a group authorization error carrying a custom message and no group ID.
§Arguments
message- the error’s message
Sourcepub fn with_group_id(
group_id: impl Into<String>,
message: impl Into<String>,
) -> Self
pub fn with_group_id( group_id: impl Into<String>, message: impl Into<String>, ) -> Self
Creates a group authorization error carrying a custom message.
§Arguments
group_id- the group ID that failed authorizationmessage- the error’s message
Sourcepub fn kafka_error(&self) -> &KafkaError
pub fn kafka_error(&self) -> &KafkaError
Returns the embedded KafkaError base, holding the error code, message and source.
Source§impl GroupAuthorizationError
impl GroupAuthorizationError
Sourcepub fn source(&self) -> Option<&Error>
pub fn source(&self) -> Option<&Error>
Returns the underlying cause, if any, held by the embedded KafkaError base: Java’s
getCause().
Trait Implementations§
Source§impl Clone for GroupAuthorizationError
impl Clone for GroupAuthorizationError
Source§impl Debug for GroupAuthorizationError
impl Debug for GroupAuthorizationError
Source§impl Display for GroupAuthorizationError
impl Display for GroupAuthorizationError
Source§impl Error for GroupAuthorizationError
impl Error for GroupAuthorizationError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()