#[non_exhaustive]pub enum Error {
Show 162 variants
KafkaError(KafkaError),
LocalIllegalArgument(LocalIllegalArgumentError),
LocalIllegalState(LocalIllegalStateError),
LocalConcurrentModification(LocalConcurrentModificationError),
LocalTimeout(LocalTimeoutError),
Api(ApiError),
Authentication(AuthenticationError),
Authorization(AuthorizationError),
AuthorizerNotReady(AuthorizerNotReadyError),
BrokerIdNotRegistered(BrokerIdNotRegisteredError),
BrokerNotAvailable(BrokerNotAvailableError),
ProducerBufferExhausted(ProducerBufferExhaustedError),
ClusterAuthorization(ClusterAuthorizationError),
ConcurrentTransactions(ConcurrentTransactionsError),
ControllerMoved(ControllerMovedError),
CoordinatorLoadInProgress(CoordinatorLoadInProgressError),
CoordinatorNotAvailable(CoordinatorNotAvailableError),
CorrelationIdMismatch(CorrelationIdMismatchError),
CorruptRecord(CorruptRecordError),
DelegationTokenAuthorization(DelegationTokenAuthorizationError),
DelegationTokenDisabled(DelegationTokenDisabledError),
DelegationTokenExpired(DelegationTokenExpiredError),
DelegationTokenNotFound(DelegationTokenNotFoundError),
DelegationTokenOwnerMismatch(DelegationTokenOwnerMismatchError),
Disconnect(DisconnectError),
DuplicateBrokerRegistration(DuplicateBrokerRegistrationError),
DuplicateResource(DuplicateResourceError),
DuplicateSequence(DuplicateSequenceError),
DuplicateVoter(DuplicateVoterError),
ElectionNotNeeded(ElectionNotNeededError),
EligibleLeadersNotAvailable(EligibleLeadersNotAvailableError),
FeatureUpdateFailed(FeatureUpdateFailedError),
FencedInstanceId(FencedInstanceIdError),
FencedLeaderEpoch(FencedLeaderEpochError),
FencedMemberEpoch(FencedMemberEpochError),
FencedStateEpoch(FencedStateEpochError),
FetchSessionIdNotFound(FetchSessionIdNotFoundError),
FetchSessionTopicId(FetchSessionTopicIdError),
GroupAuthorization(GroupAuthorizationError),
GroupIdNotFound(GroupIdNotFoundError),
GroupMaxSizeReached(GroupMaxSizeReachedError),
GroupNotEmpty(GroupNotEmptyError),
GroupSubscribedToTopic(GroupSubscribedToTopicError),
IllegalGeneration(IllegalGenerationError),
IllegalSaslState(IllegalSaslStateError),
InconsistentClusterId(InconsistentClusterIdError),
InconsistentGroupProtocol(InconsistentGroupProtocolError),
InconsistentTopicId(InconsistentTopicIdError),
InconsistentVoterSet(InconsistentVoterSetError),
IneligibleReplica(IneligibleReplicaError),
Interrupt(InterruptError),
InvalidCommitOffsetSize(InvalidCommitOffsetSizeError),
InvalidConfiguration(InvalidConfigurationError),
InvalidFetchSessionEpoch(InvalidFetchSessionEpochError),
InvalidFetchSize(InvalidFetchSizeError),
InvalidGroupId(InvalidGroupIdError),
InvalidOffset(InvalidOffsetError),
InvalidPartitions(InvalidPartitionsError),
InvalidPidMapping(InvalidPidMappingError),
InvalidPrincipalType(InvalidPrincipalTypeError),
InvalidProducerEpoch(InvalidProducerEpochError),
InvalidRecord(InvalidRecordError),
InvalidRecordState(InvalidRecordStateError),
InvalidRegistration(InvalidRegistrationError),
InvalidRegularExpression(InvalidRegularExpression),
InvalidReplicaAssignment(InvalidReplicaAssignmentError),
InvalidReplicationFactor(InvalidReplicationFactorError),
InvalidRequest(InvalidRequestError),
InvalidRequiredAcks(InvalidRequiredAcksError),
InvalidSessionTimeout(InvalidSessionTimeoutError),
InvalidShareSessionEpoch(InvalidShareSessionEpochError),
InvalidTimestamp(InvalidTimestampError),
InvalidTopic(InvalidTopicError),
InvalidTxnState(InvalidTxnStateError),
InvalidTxnTimeout(InvalidTxnTimeoutError),
InvalidUpdateVersion(InvalidUpdateVersionError),
InvalidVoterKey(InvalidVoterKeyError),
KafkaStorage(KafkaStorageError),
LeaderNotAvailable(LeaderNotAvailableError),
ListenerNotFound(ListenerNotFoundError),
LogDirNotFound(LogDirNotFoundError),
MemberIdRequired(MemberIdRequiredError),
MismatchedEndpointType(MismatchedEndpointTypeError),
Network(NetworkError),
NewLeaderElected(NewLeaderElectedError),
NoReassignmentInProgress(NoReassignmentInProgressError),
NotController(NotControllerError),
NotCoordinator(NotCoordinatorError),
NotEnoughReplicas(NotEnoughReplicasError),
NotEnoughReplicasAfterAppend(NotEnoughReplicasAfterAppendError),
NotLeaderOrFollower(NotLeaderOrFollowerError),
OffsetMetadataTooLarge(OffsetMetadataTooLarge),
OffsetMovedToTieredStorage(OffsetMovedToTieredStorageError),
OffsetNotAvailable(OffsetNotAvailableError),
OffsetOutOfRange(OffsetOutOfRangeError),
OperationNotAttempted(OperationNotAttemptedError),
OutOfOrderSequence(OutOfOrderSequenceError),
PolicyViolation(PolicyViolationError),
PositionOutOfRange(PositionOutOfRangeError),
PreferredLeaderNotAvailable(PreferredLeaderNotAvailableError),
PrincipalDeserialization(PrincipalDeserializationError),
ProducerFenced(ProducerFencedError),
QuotaViolation(Box<QuotaViolationError>),
ReassignmentInProgress(ReassignmentInProgressError),
RebalanceInProgress(RebalanceInProgressError),
RebootstrapRequired(RebootstrapRequiredError),
RecordBatchTooLarge(RecordBatchTooLargeError),
RecordDeserialization(Box<RecordDeserializationError>),
RecordTooLarge(RecordTooLargeError),
InvalidReceive(InvalidReceiveError),
Config(ConfigError),
ConsumerRetriableCommitFailed(ConsumerRetriableCommitFailedError),
ConsumerCommitFailed(ConsumerCommitFailedError),
ConsumerNoOffsetForPartition(ConsumerNoOffsetForPartitionError),
ConsumerOffsetOutOfRange(ConsumerOffsetOutOfRangeError),
ConsumerLogTruncation(Box<ConsumerLogTruncationError>),
ReplicaNotAvailable(ReplicaNotAvailableError),
ResourceNotFound(ResourceNotFoundError),
SaslAuthentication(SaslAuthenticationError),
Schema(SchemaError),
SecurityDisabled(SecurityDisabledError),
Serialization(SerializationError),
ShareSessionLimitReached(ShareSessionLimitReachedError),
ShareSessionNotFound(ShareSessionNotFoundError),
SnapshotNotFound(SnapshotNotFoundError),
SslAuthentication(SslAuthenticationError),
StaleBrokerEpoch(StaleBrokerEpochError),
StaleMemberEpoch(StaleMemberEpochError),
StreamsInvalidTopology(StreamsInvalidTopologyError),
StreamsInvalidTopologyEpoch(StreamsInvalidTopologyEpochError),
StreamsTopologyFenced(StreamsTopologyFencedError),
TelemetryTooLarge(TelemetryTooLargeError),
ThrottlingQuotaExceeded(ThrottlingQuotaExceededError),
Timeout(TimeoutError),
TopicAuthorization(TopicAuthorizationError),
TopicDeletionDisabled(TopicDeletionDisabledError),
TopicExists(TopicExistsError),
TransactionAbortable(TransactionAbortableError),
TransactionAborted(TransactionAbortedError),
TransactionCoordinatorFenced(TransactionCoordinatorFencedError),
TransactionalIdAuthorization(TransactionalIdAuthorizationError),
TransactionalIdNotFound(TransactionalIdNotFoundError),
UnacceptableCredential(UnacceptableCredentialError),
UnknownControllerId(UnknownControllerIdError),
UnknownLeaderEpoch(UnknownLeaderEpochError),
UnknownMemberId(UnknownMemberIdError),
UnknownProducerId(UnknownProducerIdError),
UnknownServer(UnknownServerError),
UnknownSubscriptionId(UnknownSubscriptionIdError),
UnknownTopicId(UnknownTopicIdError),
UnknownTopicOrPartition(UnknownTopicOrPartitionError),
UnreleasedInstanceId(UnreleasedInstanceIdError),
UnstableOffsetCommit(UnstableOffsetCommitError),
UnsupportedAssignor(UnsupportedAssignorError),
UnsupportedByAuthentication(UnsupportedByAuthenticationError),
UnsupportedCompressionType(UnsupportedCompressionTypeError),
UnsupportedEndpointType(UnsupportedEndpointTypeError),
UnsupportedForMessageFormat(UnsupportedForMessageFormatError),
UnsupportedSaslMechanism(UnsupportedSaslMechanismError),
UnsupportedVersion(UnsupportedVersionError),
VoterNotFound(VoterNotFoundError),
Wakeup(WakeupError),
}Expand description
Unified error type for polymorphic error handling — this crate’s top-level error, returned by every fallible API.
This enum wraps the error struct hierarchy so that any error can be
stored and returned through a single type. Most variants hold a specific
error struct that embeds KafkaError as its base;
KafkaError holds a bare one, standing for Java’s
KafkaException with no subclass.
It also carries the generic programming errors that Java keeps OUTSIDE
the KafkaException hierarchy (LocalIllegalArgument,
LocalIllegalState,
LocalConcurrentModification); flattening two
Java families into one enum is what makes
is_kafka_error necessary.
Classify by variant, not by code. Java callers write
e instanceof TopicAuthorizationException; Rust callers write
matches!(e, Error::TopicAuthorization(_)), and the is_*_error()
predicates stand in for the intermediate classes. There is no public numeric
error code: the wire-level Errors enum lives in common.protocol, a
package Java marks “not a supported API”, so the crate keeps it
pub(crate). The C bindings expose the class as the
kafka_common_ErrorCode_t enum instead.
message() and is_retriable_error() are delegated to the inner
KafkaError base. request_utils::RequestUtils::is_fatal_error and
is_transaction_abortable_error()
live only here: KafkaError mirrors Java’s KafkaException, which has
neither — they are librdkafka-style predicates required by CLAUDE.md
§12.3, so they belong on this enum rather than on the Java-shaped base.
This type is used in Result return types and Option storage where
any kind of Kafka error may occur.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
KafkaError(KafkaError)
A plain Kafka error carrying only the base fields — Java’s bare
KafkaException, with no subclass-specific context.
LocalIllegalArgument(LocalIllegalArgumentError)
Illegal argument error — an invalid argument was provided to a method.
Corresponds to Java’s IllegalArgumentException.
LocalIllegalState(LocalIllegalStateError)
Illegal state error — a method was called in an invalid state.
Corresponds to Java’s IllegalStateException.
LocalConcurrentModification(LocalConcurrentModificationError)
Concurrent modification error — the consumer was accessed from more than one thread.
Corresponds to Java’s java.util.ConcurrentModificationException,
thrown by KafkaConsumer.acquire() (“KafkaConsumer is not safe for
multi-threaded access”). Like LocalIllegalState, it is a plain
RuntimeException — neither an ApiException nor a KafkaException
— so it is never retriable and never fatal.
LocalTimeout(LocalTimeoutError)
A wait on a future timed out.
Corresponds to Java’s java.util.concurrent.TimeoutException raised by
Future.get(timeout, unit). Distinct from
Timeout, which is
org.apache.kafka.common.errors.TimeoutException — a
RetriableException. This one sits beside KafkaException, so it is
never retriable, never an api error and carries no wire code.
Api(ApiError)
See ApiError.
Authentication(AuthenticationError)
See AuthenticationError.
Authorization(AuthorizationError)
See AuthorizationError.
AuthorizerNotReady(AuthorizerNotReadyError)
BrokerIdNotRegistered(BrokerIdNotRegisteredError)
BrokerNotAvailable(BrokerNotAvailableError)
ProducerBufferExhausted(ProducerBufferExhaustedError)
ClusterAuthorization(ClusterAuthorizationError)
ConcurrentTransactions(ConcurrentTransactionsError)
ControllerMoved(ControllerMovedError)
See ControllerMovedError.
CoordinatorLoadInProgress(CoordinatorLoadInProgressError)
CoordinatorNotAvailable(CoordinatorNotAvailableError)
CorrelationIdMismatch(CorrelationIdMismatchError)
See CorrelationIdMismatchError.
Lives in common.requests, not common.errors, and extends
IllegalStateException rather than KafkaException — so like
LocalIllegalState it answers false to every
predicate.
CorruptRecord(CorruptRecordError)
See CorruptRecordError.
DelegationTokenAuthorization(DelegationTokenAuthorizationError)
DelegationTokenDisabled(DelegationTokenDisabledError)
DelegationTokenExpired(DelegationTokenExpiredError)
DelegationTokenNotFound(DelegationTokenNotFoundError)
DelegationTokenOwnerMismatch(DelegationTokenOwnerMismatchError)
Disconnect(DisconnectError)
See DisconnectError.
DuplicateBrokerRegistration(DuplicateBrokerRegistrationError)
DuplicateResource(DuplicateResourceError)
DuplicateSequence(DuplicateSequenceError)
DuplicateVoter(DuplicateVoterError)
See DuplicateVoterError.
ElectionNotNeeded(ElectionNotNeededError)
EligibleLeadersNotAvailable(EligibleLeadersNotAvailableError)
FeatureUpdateFailed(FeatureUpdateFailedError)
FencedInstanceId(FencedInstanceIdError)
FencedLeaderEpoch(FencedLeaderEpochError)
FencedMemberEpoch(FencedMemberEpochError)
FencedStateEpoch(FencedStateEpochError)
FetchSessionIdNotFound(FetchSessionIdNotFoundError)
FetchSessionTopicId(FetchSessionTopicIdError)
GroupAuthorization(GroupAuthorizationError)
GroupIdNotFound(GroupIdNotFoundError)
See GroupIdNotFoundError.
GroupMaxSizeReached(GroupMaxSizeReachedError)
GroupNotEmpty(GroupNotEmptyError)
See GroupNotEmptyError.
GroupSubscribedToTopic(GroupSubscribedToTopicError)
IllegalGeneration(IllegalGenerationError)
IllegalSaslState(IllegalSaslStateError)
InconsistentClusterId(InconsistentClusterIdError)
InconsistentGroupProtocol(InconsistentGroupProtocolError)
InconsistentTopicId(InconsistentTopicIdError)
InconsistentVoterSet(InconsistentVoterSetError)
IneligibleReplica(IneligibleReplicaError)
Interrupt(InterruptError)
See InterruptError.
InvalidCommitOffsetSize(InvalidCommitOffsetSizeError)
InvalidConfiguration(InvalidConfigurationError)
InvalidFetchSessionEpoch(InvalidFetchSessionEpochError)
InvalidFetchSize(InvalidFetchSizeError)
InvalidGroupId(InvalidGroupIdError)
See InvalidGroupIdError.
InvalidOffset(InvalidOffsetError)
See InvalidOffsetError.
InvalidPartitions(InvalidPartitionsError)
InvalidPidMapping(InvalidPidMappingError)
InvalidPrincipalType(InvalidPrincipalTypeError)
InvalidProducerEpoch(InvalidProducerEpochError)
InvalidRecord(InvalidRecordError)
See InvalidRecordError.
InvalidRecordState(InvalidRecordStateError)
InvalidRegistration(InvalidRegistrationError)
InvalidRegularExpression(InvalidRegularExpression)
InvalidReplicaAssignment(InvalidReplicaAssignmentError)
InvalidReplicationFactor(InvalidReplicationFactorError)
InvalidRequest(InvalidRequestError)
See InvalidRequestError.
InvalidRequiredAcks(InvalidRequiredAcksError)
InvalidSessionTimeout(InvalidSessionTimeoutError)
InvalidTimestamp(InvalidTimestampError)
InvalidTopic(InvalidTopicError)
See InvalidTopicError.
InvalidTxnState(InvalidTxnStateError)
See InvalidTxnStateError.
InvalidTxnTimeout(InvalidTxnTimeoutError)
InvalidUpdateVersion(InvalidUpdateVersionError)
InvalidVoterKey(InvalidVoterKeyError)
See InvalidVoterKeyError.
KafkaStorage(KafkaStorageError)
See KafkaStorageError.
LeaderNotAvailable(LeaderNotAvailableError)
ListenerNotFound(ListenerNotFoundError)
LogDirNotFound(LogDirNotFoundError)
See LogDirNotFoundError.
MemberIdRequired(MemberIdRequiredError)
MismatchedEndpointType(MismatchedEndpointTypeError)
Network(NetworkError)
See NetworkError.
NewLeaderElected(NewLeaderElectedError)
NoReassignmentInProgress(NoReassignmentInProgressError)
NotController(NotControllerError)
See NotControllerError.
NotCoordinator(NotCoordinatorError)
See NotCoordinatorError.
NotEnoughReplicas(NotEnoughReplicasError)
NotEnoughReplicasAfterAppend(NotEnoughReplicasAfterAppendError)
NotLeaderOrFollower(NotLeaderOrFollowerError)
OffsetMetadataTooLarge(OffsetMetadataTooLarge)
OffsetMovedToTieredStorage(OffsetMovedToTieredStorageError)
OffsetNotAvailable(OffsetNotAvailableError)
OffsetOutOfRange(OffsetOutOfRangeError)
OperationNotAttempted(OperationNotAttemptedError)
OutOfOrderSequence(OutOfOrderSequenceError)
PolicyViolation(PolicyViolationError)
See PolicyViolationError.
PositionOutOfRange(PositionOutOfRangeError)
PreferredLeaderNotAvailable(PreferredLeaderNotAvailableError)
PrincipalDeserialization(PrincipalDeserializationError)
ProducerFenced(ProducerFencedError)
See ProducerFencedError.
QuotaViolation(Box<QuotaViolationError>)
See QuotaViolationError.
Boxed for the same reason as RecordDeserialization:
it carries a whole MetricName (three
Strings and a BTreeMap), which unboxed makes it the largest payload in
the enum at 120 bytes and pushes Error — and with it every
Result<_, Error> in the crate — past clippy’s 128-byte
result_large_err threshold.
ReassignmentInProgress(ReassignmentInProgressError)
RebalanceInProgress(RebalanceInProgressError)
RebootstrapRequired(RebootstrapRequiredError)
RecordBatchTooLarge(RecordBatchTooLargeError)
RecordDeserialization(Box<RecordDeserializationError>)
See RecordDeserializationError.
Boxed: it carries the full record context (partition, offsets, key/value
buffers, headers), which unboxed pushes Error — and every
Result<_, Error> — past clippy’s 128-byte result_large_err threshold.
RecordTooLarge(RecordTooLargeError)
See RecordTooLargeError.
InvalidReceive(InvalidReceiveError)
See InvalidReceiveError.
Config(ConfigError)
See ConfigError.
ConsumerRetriableCommitFailed(ConsumerRetriableCommitFailedError)
ConsumerCommitFailed(ConsumerCommitFailedError)
ConsumerNoOffsetForPartition(ConsumerNoOffsetForPartitionError)
ConsumerOffsetOutOfRange(ConsumerOffsetOutOfRangeError)
ConsumerLogTruncation(Box<ConsumerLogTruncationError>)
See ConsumerLogTruncationError.
Boxed: it carries two maps, and unboxed it made Error — and therefore
every Result<_, Error> in the crate — exceed 128 bytes.
ReplicaNotAvailable(ReplicaNotAvailableError)
ResourceNotFound(ResourceNotFoundError)
SaslAuthentication(SaslAuthenticationError)
Schema(SchemaError)
See SchemaError.
Lives in common.protocol.types, not common.errors.
SecurityDisabled(SecurityDisabledError)
Serialization(SerializationError)
See SerializationError.
SnapshotNotFound(SnapshotNotFoundError)
SslAuthentication(SslAuthenticationError)
StaleBrokerEpoch(StaleBrokerEpochError)
StaleMemberEpoch(StaleMemberEpochError)
StreamsInvalidTopology(StreamsInvalidTopologyError)
StreamsInvalidTopologyEpoch(StreamsInvalidTopologyEpochError)
StreamsTopologyFenced(StreamsTopologyFencedError)
TelemetryTooLarge(TelemetryTooLargeError)
ThrottlingQuotaExceeded(ThrottlingQuotaExceededError)
Timeout(TimeoutError)
See TimeoutError.
TopicAuthorization(TopicAuthorizationError)
TopicDeletionDisabled(TopicDeletionDisabledError)
TopicExists(TopicExistsError)
See TopicExistsError.
TransactionAbortable(TransactionAbortableError)
TransactionAborted(TransactionAbortedError)
TransactionCoordinatorFenced(TransactionCoordinatorFencedError)
TransactionalIdAuthorization(TransactionalIdAuthorizationError)
TransactionalIdNotFound(TransactionalIdNotFoundError)
UnacceptableCredential(UnacceptableCredentialError)
UnknownControllerId(UnknownControllerIdError)
UnknownLeaderEpoch(UnknownLeaderEpochError)
UnknownMemberId(UnknownMemberIdError)
See UnknownMemberIdError.
UnknownProducerId(UnknownProducerIdError)
UnknownServer(UnknownServerError)
See UnknownServerError.
UnknownSubscriptionId(UnknownSubscriptionIdError)
UnknownTopicId(UnknownTopicIdError)
See UnknownTopicIdError.
UnknownTopicOrPartition(UnknownTopicOrPartitionError)
UnreleasedInstanceId(UnreleasedInstanceIdError)
UnstableOffsetCommit(UnstableOffsetCommitError)
UnsupportedAssignor(UnsupportedAssignorError)
UnsupportedByAuthentication(UnsupportedByAuthenticationError)
UnsupportedCompressionType(UnsupportedCompressionTypeError)
UnsupportedEndpointType(UnsupportedEndpointTypeError)
UnsupportedForMessageFormat(UnsupportedForMessageFormatError)
UnsupportedSaslMechanism(UnsupportedSaslMechanismError)
UnsupportedVersion(UnsupportedVersionError)
VoterNotFound(VoterNotFoundError)
See VoterNotFoundError.
Wakeup(WakeupError)
See WakeupError.
Implementations§
Source§impl Error
impl Error
Sourcepub fn kafka() -> Self
pub fn kafka() -> Self
Create a bare Kafka error with no message, translating Java’s no-arg
new KafkaException() (KafkaException.java:38).
The four kafka* constructors below translate KafkaException’s four
(:38, :30, :34, :26). Their parameter-name intersection is empty
and the no-arg form matches it, so under CLAUDE.md §2 this one keeps the
plain name and the others are suffixed with their parameters.
This is deliberately NOT new with
Errors::UnknownServerError: that constructor resolves the code to the
class Java associates with it and yields
UnknownServer, an ApiException. Java’s bare
KafkaException is a sibling of ApiException, not a subclass, so it
belongs in the KafkaError variant. The difference is
observable: is_api_error answers false here and
true there, and callers such as KafkaProducer.doSend dispatch on
exactly that (catch (ApiException e) returns a failed future,
catch (KafkaException e) rethrows).
The wire code stays Errors::UnknownServerError because a
client-constructed KafkaException has no protocol code of its own.
Java’s no-arg form leaves the message null; Rust reports the code’s
default message instead, since KafkaError stores the code rather than
deriving it from a subclass and always has one to fall back on.
Sourcepub fn kafka_message(message: impl Into<String>) -> Self
pub fn kafka_message(message: impl Into<String>) -> Self
Create a bare Kafka error, translating Java’s
new KafkaException(String message) (KafkaException.java:30).
See kafka for why this does not go through
with_message.
Sourcepub fn kafka_source(source: Error) -> Self
pub fn kafka_source(source: Error) -> Self
Create a bare Kafka error carrying only the error that caused it,
translating Java’s new KafkaException(Throwable cause)
(KafkaException.java:34).
See kafka for why this does not go through
with_message.
Sourcepub fn kafka_message_source(message: impl Into<String>, source: Error) -> Self
pub fn kafka_message_source(message: impl Into<String>, source: Error) -> Self
Create a bare Kafka error carrying the error that caused it, translating
Java’s new KafkaException(String message, Throwable cause)
(KafkaException.java:26).
See kafka for why this does not go through
with_message.
Create a topic authorization error
(Java: new TopicAuthorizationException(unauthorizedTopics)).
The pair intersects on {unauthorizedTopics}, which is exactly this
overload, so it keeps the plain name (CLAUDE.md §2).
Create a topic authorization error carrying a custom message
(Java: new TopicAuthorizationException(message, unauthorizedTopics)).
Sourcepub fn invalid_topics(topics: HashSet<String>) -> Self
pub fn invalid_topics(topics: HashSet<String>) -> Self
Create an invalid topic error
(Java: new InvalidTopicException(invalidTopics)).
The pair intersects on {invalidTopics}, which is exactly this overload,
so it keeps the plain name (CLAUDE.md §2).
Sourcepub fn invalid_topics_message(
topics: HashSet<String>,
message: impl Into<String>,
) -> Self
pub fn invalid_topics_message( topics: HashSet<String>, message: impl Into<String>, ) -> Self
Create an invalid topic error carrying a custom message
(Java: new InvalidTopicException(message, invalidTopics), and the
new InvalidTopicException(String message) form when topics is empty).
Create a group authorization error for a group ID, formatting the group
into the message (Java: GroupAuthorizationException.forGroupId(groupId)).
Create a group authorization error carrying a custom message
(Java: new GroupAuthorizationException(message, groupId)).
Sourcepub fn invalid_group_id(message: impl Into<String>) -> Self
pub fn invalid_group_id(message: impl Into<String>) -> Self
Create an invalid group ID error.
Corresponds to Java’s InvalidGroupIdException (an ApiException
subclass carrying error code Errors::InvalidGroupId). Thrown
by group-management / offset-commit APIs when the consumer was
constructed without a valid group.id.
Sourcepub fn throttling_quota_exceeded(
throttle_time_ms: i32,
message: impl Into<String>,
) -> Self
pub fn throttling_quota_exceeded( throttle_time_ms: i32, message: impl Into<String>, ) -> Self
Create a throttling quota exceeded error.
Corresponds to Java’s ThrottlingQuotaExceededException(int, String).
Sourcepub fn throttle_time_ms(&self) -> Option<i32>
pub fn throttle_time_ms(&self) -> Option<i32>
The throttle time carried by a ThrottlingQuotaExceeded
error, or None for any other error.
Mirrors Java’s ThrottlingQuotaExceededException.throttleTimeMs().
Sourcepub fn buffer_exhausted(message: impl Into<String>) -> Self
pub fn buffer_exhausted(message: impl Into<String>) -> Self
Create a buffer exhausted error.
Corresponds to Java’s BufferExhaustedException.
Sourcepub fn local_illegal_argument(message: impl Into<String>) -> Self
pub fn local_illegal_argument(message: impl Into<String>) -> Self
Create an illegal argument error.
Corresponds to Java’s IllegalArgumentException.
Sourcepub fn config_message(message: impl Into<String>) -> Self
pub fn config_message(message: impl Into<String>) -> Self
Create a configuration error, in Java’s ConfigException(message) format.
Corresponds to Java’s ConfigException — an invalid config value. Unlike
illegal_argument this is inside the
KafkaException hierarchy, so is_kafka_error is
true for it.
Sourcepub fn config_name_value(name: impl Display, value: impl Display) -> Self
pub fn config_name_value(name: impl Display, value: impl Display) -> Self
Create a configuration error naming the offending value and key, in
Java’s ConfigException(name, value) format.
Sourcepub fn config_name_value_message(
name: impl Display,
value: impl Display,
message: impl Display,
) -> Self
pub fn config_name_value_message( name: impl Display, value: impl Display, message: impl Display, ) -> Self
Create a configuration error naming the value, key, and a detail message,
in Java’s ConfigException(name, value, message) format.
Sourcepub fn local_illegal_state(message: impl Into<String>) -> Self
pub fn local_illegal_state(message: impl Into<String>) -> Self
Create an illegal state error.
Corresponds to Java’s IllegalStateException.
Sourcepub fn timeout(message: impl Into<String>) -> Self
pub fn timeout(message: impl Into<String>) -> Self
Create a timeout error.
Corresponds to Java’s TimeoutException.
Sourcepub fn record_too_large(message: impl Into<String>) -> Self
pub fn record_too_large(message: impl Into<String>) -> Self
Create a record too large error.
Corresponds to Java’s RecordTooLargeException.
Sourcepub fn correlation_id_mismatch(
message: impl Into<String>,
request_correlation_id: i32,
response_correlation_id: i32,
) -> Self
pub fn correlation_id_mismatch( message: impl Into<String>, request_correlation_id: i32, response_correlation_id: i32, ) -> Self
Create a correlation-id mismatch error.
Corresponds to Java’s
CorrelationIdMismatchException(String, int, int) — an
IllegalStateException, so outside the KafkaException hierarchy.
Sourcepub fn invalid_receive(message: impl Into<String>) -> Self
pub fn invalid_receive(message: impl Into<String>) -> Self
Create an invalid-receive error.
Corresponds to Java’s InvalidReceiveException(String). The class is not
public API (common.network), so this constructor is how code outside
the crate — e.g. a test backend decoding an error sent over the wire —
builds the variant.
Sourcepub fn schema(message: impl Into<String>) -> Self
pub fn schema(message: impl Into<String>) -> Self
Create a protocol-schema error.
Corresponds to Java’s SchemaException(String).
Sourcepub fn schema_source(message: impl Into<String>, source: Error) -> Self
pub fn schema_source(message: impl Into<String>, source: Error) -> Self
Create a protocol-schema error carrying the failure that caused it.
Corresponds to Java’s SchemaException(String, Throwable), used by
NetworkClient.parseResponse to wrap a buffer underflow.
The pair intersects on {message}, which is exactly
schema, so that one keeps the plain name and this is
suffixed with the parameter beyond it (CLAUDE.md §2).
Sourcepub fn serialization(message: impl Into<String>) -> Self
pub fn serialization(message: impl Into<String>) -> Self
Create a serialization error.
Corresponds to Java’s SerializationException.
Sourcepub fn unsupported_version(message: impl Into<String>) -> Self
pub fn unsupported_version(message: impl Into<String>) -> Self
Create an unsupported version error.
Corresponds to Java’s UnsupportedVersionException.
Sourcepub fn wakeup(message: impl Into<String>) -> Self
pub fn wakeup(message: impl Into<String>) -> Self
Create a wakeup error.
Corresponds to Java’s WakeupException. Returned from blocking
Consumer operations (poll, commit_sync, position, etc.)
when wakeup() is invoked from another task.
Sourcepub fn local_concurrent_modification(message: impl Into<String>) -> Self
pub fn local_concurrent_modification(message: impl Into<String>) -> Self
Create a concurrent modification error.
Corresponds to Java’s ConcurrentModificationException thrown by
KafkaConsumer.acquire() when the consumer is accessed from more
than one thread.
Sourcepub fn local_timeout(message: impl Into<String>) -> Self
pub fn local_timeout(message: impl Into<String>) -> Self
Create a timed-out-waiting-on-a-future error.
Corresponds to Java’s java.util.concurrent.TimeoutException from
Future.get(timeout, unit). Use Error::timeout instead for
org.apache.kafka.common.errors.TimeoutException, the retriable Kafka
class the broker reports.
Sourcepub fn transaction_aborted() -> Self
pub fn transaction_aborted() -> Self
Create a transaction aborted error with Java’s default message.
Corresponds to Java’s no-arg TransactionAbortedException()
(TransactionAbortedException.java:35), whose message is
"Failing batch since transaction was aborted".
The pair’s parameter-name intersection is empty and this overload matches it, so it keeps the plain name (CLAUDE.md §2).
Sourcepub fn transaction_aborted_message(message: impl Into<String>) -> Self
pub fn transaction_aborted_message(message: impl Into<String>) -> Self
Create a transaction aborted error with a custom message.
Corresponds to Java’s TransactionAbortedException(String) (:31).
Sourcepub fn record_batch_too_large(message: impl Into<String>) -> Self
pub fn record_batch_too_large(message: impl Into<String>) -> Self
Create a record batch too large error.
Corresponds to Java’s RecordBatchTooLargeException.
Sourcepub fn kafka_error(&self) -> Option<&KafkaError>
pub fn kafka_error(&self) -> Option<&KafkaError>
Access the base KafkaError common to all variants.
Returns None for variants that do not carry a KafkaError
(e.g. LocalIllegalArgument, LocalIllegalState).
Sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
The error message, translating Java’s Throwable.getMessage().
Delegated to the variant’s payload: a message-only error returns the text
it was constructed with, and a payload wrapping a KafkaError returns
its custom message if set, otherwise the default text for its error code.
This is NOT what to_string() produces. std::fmt::Display translates
Throwable.toString(), which Java renders as
getClass().getName() + ": " + getLocalizedMessage() — so Display
carries a class-name prefix and, for some payloads, extra subclass state.
Use this method for log fields and equality assertions; use Display
when rendering the error to a human.
Sourcepub fn source(&self) -> Option<&Error>
pub fn source(&self) -> Option<&Error>
The error that caused this one, translating Java’s Throwable.getCause().
getCause() lives on Throwable, so every error can carry a cause — this
answers for all of them, delegated to the variant’s payload. None is the
common case, mirroring Java’s null default.
std::error::Error::source returns the same value, so the standard
library’s chain-walking works on any Error.
Sourcepub fn is_transaction_abortable_error(&self) -> bool
pub fn is_transaction_abortable_error(&self) -> bool
Whether the transaction must be aborted because of this error.
Named for the Java class it tests, per CLAUDE.md §12.4’s uniform
is_ + class + _error shape, even though TransactionAbortableException
is a leaf: it has no subclasses, so §10.4 puts no predicate on
ErrorHierarchy for it and this stays an inherent test on the variant.
That is what Java does too — TransactionManager compares the code
(error == Errors.TRANSACTION_ABORTABLE, four sites) or tests the class
(error.exception() instanceof TransactionAbortableException,
TransactionManager.java:1783). There is no txnRequiresAbort in Java;
the previous name had no counterpart there.
Sourcepub fn is_kafka_error(&self) -> bool
pub fn is_kafka_error(&self) -> bool
Whether this is a Kafka error rather than a generic programming error.
This enum flattens two families that Java keeps apart by class
hierarchy: Kafka’s own KafkaException tree, and the generic
java.lang / java.util runtime exceptions that sit beside it as
siblings rather than below it (common/KafkaException.java:22). This
predicate recovers that distinction, mirroring Java’s
t instanceof KafkaException.
Returns false for exactly the generic variants — the ones raised by
misuse of the client rather than by Kafka itself:
LocalIllegalArgument,
LocalIllegalState and
LocalConcurrentModification.
Everything else returns true: the ApiException subtypes,
Serialization, Wakeup and the
bare KafkaError all map to KafkaException
subclasses.
This is not a test for the KafkaError variant.
That variant means “a bare KafkaException, no subclass”; this asks
“inside the KafkaException hierarchy at all”, which is true of
Timeout, TopicAuthorization and most other variants too. To test the
variant, match on it.
Beware the polarity difference against is_api_error:
both return true for the in-hierarchy case, but they are not the same
test — Serialization and Wakeup are Kafka errors that are NOT
ApiExceptions, so they return true here and false there.
Two call sites depend on this:
ConsumerUtils.maybeWrapAsKafkaException(t, message)
(ConsumerUtils.java:256) — a Kafka error passes through unchanged, a
generic one gets wrapped in a new KafkaException(message, t) — and
FetchCollector, whose Java catch (KafkaException e) cannot catch a
generic error, so those propagate where Kafka errors are swallowed.
Sourcepub fn is_api_error(&self) -> bool
pub fn is_api_error(&self) -> bool
Whether this error corresponds to a Java ApiException.
In Java, ApiException is a subclass of KafkaException representing
errors from the Kafka API. In KafkaProducer.doSend(), ApiExceptions
are caught and returned via a failed future (with callback invocation),
while other exceptions propagate directly.
true for every payload whose extends: list names is_api_error —
which is every class carrying a protocol code, since Errors.java only
names ApiException subclasses, plus the code-less concrete bases
Api, Authentication and
Authorization. Examples:
InvalidTopic,
RecordTooLarge, Timeout,
TopicAuthorization,
GroupAuthorization,
ThrottlingQuotaExceeded and
ProducerBufferExhausted.
false for the bare KafkaError — KafkaException
is ApiException’s parent, not an instance of it, and since
Error::new resolves every code to its own class that variant is now
reached only for Errors::None and for
Error::kafka. Also false for
LocalIllegalArgument and
LocalIllegalState (plain RuntimeExceptions),
LocalConcurrentModification, and for
Serialization / Wakeup, which
extend KafkaException directly without passing through ApiException.
Not to be confused with is_kafka_error, which
asks the broader question.
Sourcepub fn is_retriable_error(&self) -> bool
pub fn is_retriable_error(&self) -> bool
Whether this error’s Java class extends RetriableException — i.e.
whether re-sending the failed request can succeed.
The answer belongs to the payload, not to the enum: each error class
names is_retriable_error in its extends: list, so the covered set is
exactly the classes whose Java ancestry passes through
RetriableException — directly, or via RefreshRetriableException,
InvalidMetadataException or TimeoutException. Timeout
is retriable (Java’s TimeoutException extends RetriableException), as
are ThrottlingQuotaExceeded and
ProducerBufferExhausted (through
BufferExhaustedException extends TimeoutException).
Since Error::new resolves every code to its own class, the set of
codes answering true is pinned in both directions — against the Java
extends chain, over every code — by errors.rs’s
test_retriable_errors_match_java_hierarchy.
The bare KafkaError answers false
(KafkaException is not a RetriableException), and so do
LocalIllegalArgument and
LocalIllegalState.
Sourcepub fn is_refresh_retriable_error(&self) -> bool
pub fn is_refresh_retriable_error(&self) -> bool
Whether this error’s Java class extends RefreshRetriableException
(CLAUDE.md §12.4) — retriable, and a metadata / coordinator refresh is
what clears it.
Fifteen payloads name it in their extends: list: the thirteen that also
answer is_invalid_metadata_error
(InvalidMetadataException extends RefreshRetriableException), plus
CoordinatorNotAvailable and
NotCoordinator. All fifteen carry a protocol
code, so the set is pinned in both directions over every code by
errors.rs’s test_hierarchy_predicates_match_java.
The bare KafkaError answers false, as do the
payloads carrying no protocol code.
Sourcepub fn is_timeout_error(&self) -> bool
pub fn is_timeout_error(&self) -> bool
Whether this error’s Java class extends TimeoutException
(CLAUDE.md §12.4).
Wider than the Timeout variant:
BufferExhaustedException extends TimeoutException, so
ProducerBufferExhausted answers true
here too — matching Java, where catch (TimeoutException e) catches a
buffer-pool exhaustion. Match the variant if you mean only the timeout
itself.
Nested inside is_retriable_error.
Sourcepub fn is_invalid_metadata_error(&self) -> bool
pub fn is_invalid_metadata_error(&self) -> bool
Whether this error’s Java class extends InvalidMetadataException
(CLAUDE.md §12.4) — the client’s cached metadata may be stale.
Nested inside is_refresh_retriable_error,
which is nested inside is_retriable_error.
Thirteen payloads name it, all of them code-carrying; the set is pinned in
both directions over every code by errors.rs’s
test_hierarchy_predicates_match_java.
Sourcepub fn is_invalid_configuration_error(&self) -> bool
pub fn is_invalid_configuration_error(&self) -> bool
Whether this error’s Java class extends InvalidConfigurationException
(CLAUDE.md §12.4).
Wider than its name suggests: in Kafka 4.2 both
AuthenticationException and AuthorizationException extend
InvalidConfigurationException rather than ApiException directly, so
every error answering true to
is_authentication_error or
is_authorization_error answers true
here too. The remaining members are the configuration errors proper —
Errors::InvalidConfig, Errors::InvalidReplicationFactor,
Errors::InvalidRequiredAcks, Errors::InvalidTopicError,
Errors::RecordListTooLarge, Errors::UnsupportedForMessageFormat
and Errors::UnsupportedVersion.
Sourcepub fn is_application_recoverable_error(&self) -> bool
pub fn is_application_recoverable_error(&self) -> bool
Whether this error’s Java class extends ApplicationRecoverableException
(CLAUDE.md §12.4) — the application can recover, but only by
re-initialising its producer or rejoining its group; the current epoch or
session is gone.
6 codes, covering the transaction and group-membership fencing paths:
Errors::FencedInstanceId, Errors::IllegalGeneration,
Errors::InvalidProducerEpoch, Errors::InvalidProducerIdMapping,
Errors::ProducerFenced and Errors::UnknownMemberId.
Sourcepub fn is_invalid_offset_error(&self) -> bool
pub fn is_invalid_offset_error(&self) -> bool
Whether this error’s Java class extends InvalidOffsetException
(CLAUDE.md §12.4).
Errors::OffsetOutOfRange is the only member carrying a protocol code;
the sibling NoOffsetForPartitionException is raised client-side.
Sourcepub fn is_out_of_order_sequence_error(&self) -> bool
pub fn is_out_of_order_sequence_error(&self) -> bool
Whether this error’s Java class extends OutOfOrderSequenceException
(CLAUDE.md §12.4).
Two codes: Errors::OutOfOrderSequenceNumber itself and
Errors::UnknownProducerId, its only subclass.
Sourcepub fn is_consumer_invalid_offset_error(&self) -> bool
pub fn is_consumer_invalid_offset_error(&self) -> bool
Whether this error’s Java class extends
org.apache.kafka.clients.consumer.InvalidOffsetException
(CLAUDE.md §12.4) — no offset is usable for the partition.
Covers
ConsumerNoOffsetForPartition,
ConsumerOffsetOutOfRange and
ConsumerLogTruncation — the Consumer
prefix is what CLAUDE.md §2 adds to the clients.consumer package’s
classes, so it is part of the variant name.
Distinct from is_invalid_offset_error,
which tests common.errors.InvalidOffsetException — a different Java
class with a different parent (ApiException rather than
KafkaException). The wire code OFFSET_OUT_OF_RANGE produces that one;
KafkaConsumer::poll raises these.
Sourcepub fn is_consumer_offset_out_of_range_error(&self) -> bool
pub fn is_consumer_offset_out_of_range_error(&self) -> bool
Whether this error’s Java class extends
org.apache.kafka.clients.consumer.OffsetOutOfRangeException
(CLAUDE.md §12.4).
Wider than the ConsumerOffsetOutOfRange
variant: LogTruncationException extends that class, so
ConsumerLogTruncation answers true too
— matching Java, where catch (OffsetOutOfRangeException e) catches a
log truncation.
Nested inside
is_consumer_invalid_offset_error.
Distinct from is_invalid_offset_error,
which tests the common.errors class of the same name.
Sourcepub fn is_serialization_error(&self) -> bool
pub fn is_serialization_error(&self) -> bool
Whether this error’s Java class extends SerializationException
(CLAUDE.md §12.4).
No protocol code maps here — SerializationException and its subclass
RecordDeserializationException are raised client-side — so only
Serialization answers true. Note it is a
KafkaException but NOT an ApiException, so
is_api_error is false for it.
Sourcepub fn is_authentication_error(&self) -> bool
pub fn is_authentication_error(&self) -> bool
Whether this error’s Java class extends AuthenticationException
(CLAUDE.md §12.4).
Five payloads name it in their extends: list:
Authentication — the concrete base class, which
has no entry in Errors of its own but inherits
Errors::InvalidConfig from InvalidConfigurationException — plus
SaslAuthentication,
SslAuthentication,
IllegalSaslState and
UnsupportedSaslMechanism. Three of
them carry a code (SASL_AUTHENTICATION_FAILED, ILLEGAL_SASL_STATE,
UNSUPPORTED_SASL_MECHANISM) and that code set is pinned in both
directions over every code by errors.rs’s
test_hierarchy_predicates_match_java.
A handshake failure detected locally starts out as an
AuthenticationError payload inside an io::Error
(common::network::auth_io_error), and it DOES reach this enum: the
producer’s Sender rebuilds it as Authentication
when failing the transaction manager’s pending requests, because that is
the only spelling for which this predicate — and hence
request_utils::RequestUtils::is_fatal_error — answers true.
Nested inside
is_invalid_configuration_error.
Whether this error’s Java class extends AuthorizationException
(CLAUDE.md §12.4).
Six payloads name it in their extends: list:
Authorization — the concrete base class, which
has no entry in Errors of its own but inherits
Errors::InvalidConfig from InvalidConfigurationException — plus the five
that do carry one,
TopicAuthorization,
GroupAuthorization,
ClusterAuthorization,
TransactionalIdAuthorization and
DelegationTokenAuthorization.
Those five codes are pinned in both directions over every code by
errors.rs’s test_hierarchy_predicates_match_java; the bare
KafkaError answers false.
Nested inside
is_invalid_configuration_error.
Trait Implementations§
Source§impl Display for Errorwhere
WakeupError: Display,
KafkaError: MatchDisplay<WakeupError>,
LocalIllegalArgumentError: MatchDisplay<WakeupError>,
LocalIllegalStateError: MatchDisplay<WakeupError>,
LocalConcurrentModificationError: MatchDisplay<WakeupError>,
LocalTimeoutError: MatchDisplay<WakeupError>,
ApiError: MatchDisplay<WakeupError>,
AuthenticationError: MatchDisplay<WakeupError>,
AuthorizationError: MatchDisplay<WakeupError>,
AuthorizerNotReadyError: MatchDisplay<WakeupError>,
BrokerIdNotRegisteredError: MatchDisplay<WakeupError>,
BrokerNotAvailableError: MatchDisplay<WakeupError>,
ProducerBufferExhaustedError: MatchDisplay<WakeupError>,
ClusterAuthorizationError: MatchDisplay<WakeupError>,
ConcurrentTransactionsError: MatchDisplay<WakeupError>,
ControllerMovedError: MatchDisplay<WakeupError>,
CoordinatorLoadInProgressError: MatchDisplay<WakeupError>,
CoordinatorNotAvailableError: MatchDisplay<WakeupError>,
CorrelationIdMismatchError: MatchDisplay<WakeupError>,
CorruptRecordError: MatchDisplay<WakeupError>,
DelegationTokenAuthorizationError: MatchDisplay<WakeupError>,
DelegationTokenDisabledError: MatchDisplay<WakeupError>,
DelegationTokenExpiredError: MatchDisplay<WakeupError>,
DelegationTokenNotFoundError: MatchDisplay<WakeupError>,
DelegationTokenOwnerMismatchError: MatchDisplay<WakeupError>,
DisconnectError: MatchDisplay<WakeupError>,
DuplicateBrokerRegistrationError: MatchDisplay<WakeupError>,
DuplicateResourceError: MatchDisplay<WakeupError>,
DuplicateSequenceError: MatchDisplay<WakeupError>,
DuplicateVoterError: MatchDisplay<WakeupError>,
ElectionNotNeededError: MatchDisplay<WakeupError>,
EligibleLeadersNotAvailableError: MatchDisplay<WakeupError>,
FeatureUpdateFailedError: MatchDisplay<WakeupError>,
FencedInstanceIdError: MatchDisplay<WakeupError>,
FencedLeaderEpochError: MatchDisplay<WakeupError>,
FencedMemberEpochError: MatchDisplay<WakeupError>,
FencedStateEpochError: MatchDisplay<WakeupError>,
FetchSessionIdNotFoundError: MatchDisplay<WakeupError>,
FetchSessionTopicIdError: MatchDisplay<WakeupError>,
GroupAuthorizationError: MatchDisplay<WakeupError>,
GroupIdNotFoundError: MatchDisplay<WakeupError>,
GroupMaxSizeReachedError: MatchDisplay<WakeupError>,
GroupNotEmptyError: MatchDisplay<WakeupError>,
GroupSubscribedToTopicError: MatchDisplay<WakeupError>,
IllegalGenerationError: MatchDisplay<WakeupError>,
IllegalSaslStateError: MatchDisplay<WakeupError>,
InconsistentClusterIdError: MatchDisplay<WakeupError>,
InconsistentGroupProtocolError: MatchDisplay<WakeupError>,
InconsistentTopicIdError: MatchDisplay<WakeupError>,
InconsistentVoterSetError: MatchDisplay<WakeupError>,
IneligibleReplicaError: MatchDisplay<WakeupError>,
InterruptError: MatchDisplay<WakeupError>,
InvalidCommitOffsetSizeError: MatchDisplay<WakeupError>,
InvalidConfigurationError: MatchDisplay<WakeupError>,
InvalidFetchSessionEpochError: MatchDisplay<WakeupError>,
InvalidFetchSizeError: MatchDisplay<WakeupError>,
InvalidGroupIdError: MatchDisplay<WakeupError>,
InvalidOffsetError: MatchDisplay<WakeupError>,
InvalidPartitionsError: MatchDisplay<WakeupError>,
InvalidPidMappingError: MatchDisplay<WakeupError>,
InvalidPrincipalTypeError: MatchDisplay<WakeupError>,
InvalidProducerEpochError: MatchDisplay<WakeupError>,
InvalidRecordError: MatchDisplay<WakeupError>,
InvalidRecordStateError: MatchDisplay<WakeupError>,
InvalidRegistrationError: MatchDisplay<WakeupError>,
InvalidRegularExpression: MatchDisplay<WakeupError>,
InvalidReplicaAssignmentError: MatchDisplay<WakeupError>,
InvalidReplicationFactorError: MatchDisplay<WakeupError>,
InvalidRequestError: MatchDisplay<WakeupError>,
InvalidRequiredAcksError: MatchDisplay<WakeupError>,
InvalidSessionTimeoutError: MatchDisplay<WakeupError>,
InvalidShareSessionEpochError: MatchDisplay<WakeupError>,
InvalidTimestampError: MatchDisplay<WakeupError>,
InvalidTopicError: MatchDisplay<WakeupError>,
InvalidTxnStateError: MatchDisplay<WakeupError>,
InvalidTxnTimeoutError: MatchDisplay<WakeupError>,
InvalidUpdateVersionError: MatchDisplay<WakeupError>,
InvalidVoterKeyError: MatchDisplay<WakeupError>,
KafkaStorageError: MatchDisplay<WakeupError>,
LeaderNotAvailableError: MatchDisplay<WakeupError>,
ListenerNotFoundError: MatchDisplay<WakeupError>,
LogDirNotFoundError: MatchDisplay<WakeupError>,
MemberIdRequiredError: MatchDisplay<WakeupError>,
MismatchedEndpointTypeError: MatchDisplay<WakeupError>,
NetworkError: MatchDisplay<WakeupError>,
NewLeaderElectedError: MatchDisplay<WakeupError>,
NoReassignmentInProgressError: MatchDisplay<WakeupError>,
NotControllerError: MatchDisplay<WakeupError>,
NotCoordinatorError: MatchDisplay<WakeupError>,
NotEnoughReplicasError: MatchDisplay<WakeupError>,
NotEnoughReplicasAfterAppendError: MatchDisplay<WakeupError>,
NotLeaderOrFollowerError: MatchDisplay<WakeupError>,
OffsetMetadataTooLarge: MatchDisplay<WakeupError>,
OffsetMovedToTieredStorageError: MatchDisplay<WakeupError>,
OffsetNotAvailableError: MatchDisplay<WakeupError>,
OffsetOutOfRangeError: MatchDisplay<WakeupError>,
OperationNotAttemptedError: MatchDisplay<WakeupError>,
OutOfOrderSequenceError: MatchDisplay<WakeupError>,
PolicyViolationError: MatchDisplay<WakeupError>,
PositionOutOfRangeError: MatchDisplay<WakeupError>,
PreferredLeaderNotAvailableError: MatchDisplay<WakeupError>,
PrincipalDeserializationError: MatchDisplay<WakeupError>,
ProducerFencedError: MatchDisplay<WakeupError>,
Box<QuotaViolationError>: MatchDisplay<WakeupError>,
ReassignmentInProgressError: MatchDisplay<WakeupError>,
RebalanceInProgressError: MatchDisplay<WakeupError>,
RebootstrapRequiredError: MatchDisplay<WakeupError>,
RecordBatchTooLargeError: MatchDisplay<WakeupError>,
Box<RecordDeserializationError>: MatchDisplay<WakeupError>,
RecordTooLargeError: MatchDisplay<WakeupError>,
InvalidReceiveError: MatchDisplay<WakeupError>,
ConfigError: MatchDisplay<WakeupError>,
ConsumerRetriableCommitFailedError: MatchDisplay<WakeupError>,
ConsumerCommitFailedError: MatchDisplay<WakeupError>,
ConsumerNoOffsetForPartitionError: MatchDisplay<WakeupError>,
ConsumerOffsetOutOfRangeError: MatchDisplay<WakeupError>,
Box<ConsumerLogTruncationError>: MatchDisplay<WakeupError>,
ReplicaNotAvailableError: MatchDisplay<WakeupError>,
ResourceNotFoundError: MatchDisplay<WakeupError>,
SaslAuthenticationError: MatchDisplay<WakeupError>,
SchemaError: MatchDisplay<WakeupError>,
SecurityDisabledError: MatchDisplay<WakeupError>,
SerializationError: MatchDisplay<WakeupError>,
ShareSessionLimitReachedError: MatchDisplay<WakeupError>,
ShareSessionNotFoundError: MatchDisplay<WakeupError>,
SnapshotNotFoundError: MatchDisplay<WakeupError>,
SslAuthenticationError: MatchDisplay<WakeupError>,
StaleBrokerEpochError: MatchDisplay<WakeupError>,
StaleMemberEpochError: MatchDisplay<WakeupError>,
StreamsInvalidTopologyError: MatchDisplay<WakeupError>,
StreamsInvalidTopologyEpochError: MatchDisplay<WakeupError>,
StreamsTopologyFencedError: MatchDisplay<WakeupError>,
TelemetryTooLargeError: MatchDisplay<WakeupError>,
ThrottlingQuotaExceededError: MatchDisplay<WakeupError>,
TimeoutError: MatchDisplay<WakeupError>,
TopicAuthorizationError: MatchDisplay<WakeupError>,
TopicDeletionDisabledError: MatchDisplay<WakeupError>,
TopicExistsError: MatchDisplay<WakeupError>,
TransactionAbortableError: MatchDisplay<WakeupError>,
TransactionAbortedError: MatchDisplay<WakeupError>,
TransactionCoordinatorFencedError: MatchDisplay<WakeupError>,
TransactionalIdAuthorizationError: MatchDisplay<WakeupError>,
TransactionalIdNotFoundError: MatchDisplay<WakeupError>,
UnacceptableCredentialError: MatchDisplay<WakeupError>,
UnknownControllerIdError: MatchDisplay<WakeupError>,
UnknownLeaderEpochError: MatchDisplay<WakeupError>,
UnknownMemberIdError: MatchDisplay<WakeupError>,
UnknownProducerIdError: MatchDisplay<WakeupError>,
UnknownServerError: MatchDisplay<WakeupError>,
UnknownSubscriptionIdError: MatchDisplay<WakeupError>,
UnknownTopicIdError: MatchDisplay<WakeupError>,
UnknownTopicOrPartitionError: MatchDisplay<WakeupError>,
UnreleasedInstanceIdError: MatchDisplay<WakeupError>,
UnstableOffsetCommitError: MatchDisplay<WakeupError>,
UnsupportedAssignorError: MatchDisplay<WakeupError>,
UnsupportedByAuthenticationError: MatchDisplay<WakeupError>,
UnsupportedCompressionTypeError: MatchDisplay<WakeupError>,
UnsupportedEndpointTypeError: MatchDisplay<WakeupError>,
UnsupportedForMessageFormatError: MatchDisplay<WakeupError>,
UnsupportedSaslMechanismError: MatchDisplay<WakeupError>,
UnsupportedVersionError: MatchDisplay<WakeupError>,
VoterNotFoundError: MatchDisplay<WakeupError>,
impl Display for Errorwhere
WakeupError: Display,
KafkaError: MatchDisplay<WakeupError>,
LocalIllegalArgumentError: MatchDisplay<WakeupError>,
LocalIllegalStateError: MatchDisplay<WakeupError>,
LocalConcurrentModificationError: MatchDisplay<WakeupError>,
LocalTimeoutError: MatchDisplay<WakeupError>,
ApiError: MatchDisplay<WakeupError>,
AuthenticationError: MatchDisplay<WakeupError>,
AuthorizationError: MatchDisplay<WakeupError>,
AuthorizerNotReadyError: MatchDisplay<WakeupError>,
BrokerIdNotRegisteredError: MatchDisplay<WakeupError>,
BrokerNotAvailableError: MatchDisplay<WakeupError>,
ProducerBufferExhaustedError: MatchDisplay<WakeupError>,
ClusterAuthorizationError: MatchDisplay<WakeupError>,
ConcurrentTransactionsError: MatchDisplay<WakeupError>,
ControllerMovedError: MatchDisplay<WakeupError>,
CoordinatorLoadInProgressError: MatchDisplay<WakeupError>,
CoordinatorNotAvailableError: MatchDisplay<WakeupError>,
CorrelationIdMismatchError: MatchDisplay<WakeupError>,
CorruptRecordError: MatchDisplay<WakeupError>,
DelegationTokenAuthorizationError: MatchDisplay<WakeupError>,
DelegationTokenDisabledError: MatchDisplay<WakeupError>,
DelegationTokenExpiredError: MatchDisplay<WakeupError>,
DelegationTokenNotFoundError: MatchDisplay<WakeupError>,
DelegationTokenOwnerMismatchError: MatchDisplay<WakeupError>,
DisconnectError: MatchDisplay<WakeupError>,
DuplicateBrokerRegistrationError: MatchDisplay<WakeupError>,
DuplicateResourceError: MatchDisplay<WakeupError>,
DuplicateSequenceError: MatchDisplay<WakeupError>,
DuplicateVoterError: MatchDisplay<WakeupError>,
ElectionNotNeededError: MatchDisplay<WakeupError>,
EligibleLeadersNotAvailableError: MatchDisplay<WakeupError>,
FeatureUpdateFailedError: MatchDisplay<WakeupError>,
FencedInstanceIdError: MatchDisplay<WakeupError>,
FencedLeaderEpochError: MatchDisplay<WakeupError>,
FencedMemberEpochError: MatchDisplay<WakeupError>,
FencedStateEpochError: MatchDisplay<WakeupError>,
FetchSessionIdNotFoundError: MatchDisplay<WakeupError>,
FetchSessionTopicIdError: MatchDisplay<WakeupError>,
GroupAuthorizationError: MatchDisplay<WakeupError>,
GroupIdNotFoundError: MatchDisplay<WakeupError>,
GroupMaxSizeReachedError: MatchDisplay<WakeupError>,
GroupNotEmptyError: MatchDisplay<WakeupError>,
GroupSubscribedToTopicError: MatchDisplay<WakeupError>,
IllegalGenerationError: MatchDisplay<WakeupError>,
IllegalSaslStateError: MatchDisplay<WakeupError>,
InconsistentClusterIdError: MatchDisplay<WakeupError>,
InconsistentGroupProtocolError: MatchDisplay<WakeupError>,
InconsistentTopicIdError: MatchDisplay<WakeupError>,
InconsistentVoterSetError: MatchDisplay<WakeupError>,
IneligibleReplicaError: MatchDisplay<WakeupError>,
InterruptError: MatchDisplay<WakeupError>,
InvalidCommitOffsetSizeError: MatchDisplay<WakeupError>,
InvalidConfigurationError: MatchDisplay<WakeupError>,
InvalidFetchSessionEpochError: MatchDisplay<WakeupError>,
InvalidFetchSizeError: MatchDisplay<WakeupError>,
InvalidGroupIdError: MatchDisplay<WakeupError>,
InvalidOffsetError: MatchDisplay<WakeupError>,
InvalidPartitionsError: MatchDisplay<WakeupError>,
InvalidPidMappingError: MatchDisplay<WakeupError>,
InvalidPrincipalTypeError: MatchDisplay<WakeupError>,
InvalidProducerEpochError: MatchDisplay<WakeupError>,
InvalidRecordError: MatchDisplay<WakeupError>,
InvalidRecordStateError: MatchDisplay<WakeupError>,
InvalidRegistrationError: MatchDisplay<WakeupError>,
InvalidRegularExpression: MatchDisplay<WakeupError>,
InvalidReplicaAssignmentError: MatchDisplay<WakeupError>,
InvalidReplicationFactorError: MatchDisplay<WakeupError>,
InvalidRequestError: MatchDisplay<WakeupError>,
InvalidRequiredAcksError: MatchDisplay<WakeupError>,
InvalidSessionTimeoutError: MatchDisplay<WakeupError>,
InvalidShareSessionEpochError: MatchDisplay<WakeupError>,
InvalidTimestampError: MatchDisplay<WakeupError>,
InvalidTopicError: MatchDisplay<WakeupError>,
InvalidTxnStateError: MatchDisplay<WakeupError>,
InvalidTxnTimeoutError: MatchDisplay<WakeupError>,
InvalidUpdateVersionError: MatchDisplay<WakeupError>,
InvalidVoterKeyError: MatchDisplay<WakeupError>,
KafkaStorageError: MatchDisplay<WakeupError>,
LeaderNotAvailableError: MatchDisplay<WakeupError>,
ListenerNotFoundError: MatchDisplay<WakeupError>,
LogDirNotFoundError: MatchDisplay<WakeupError>,
MemberIdRequiredError: MatchDisplay<WakeupError>,
MismatchedEndpointTypeError: MatchDisplay<WakeupError>,
NetworkError: MatchDisplay<WakeupError>,
NewLeaderElectedError: MatchDisplay<WakeupError>,
NoReassignmentInProgressError: MatchDisplay<WakeupError>,
NotControllerError: MatchDisplay<WakeupError>,
NotCoordinatorError: MatchDisplay<WakeupError>,
NotEnoughReplicasError: MatchDisplay<WakeupError>,
NotEnoughReplicasAfterAppendError: MatchDisplay<WakeupError>,
NotLeaderOrFollowerError: MatchDisplay<WakeupError>,
OffsetMetadataTooLarge: MatchDisplay<WakeupError>,
OffsetMovedToTieredStorageError: MatchDisplay<WakeupError>,
OffsetNotAvailableError: MatchDisplay<WakeupError>,
OffsetOutOfRangeError: MatchDisplay<WakeupError>,
OperationNotAttemptedError: MatchDisplay<WakeupError>,
OutOfOrderSequenceError: MatchDisplay<WakeupError>,
PolicyViolationError: MatchDisplay<WakeupError>,
PositionOutOfRangeError: MatchDisplay<WakeupError>,
PreferredLeaderNotAvailableError: MatchDisplay<WakeupError>,
PrincipalDeserializationError: MatchDisplay<WakeupError>,
ProducerFencedError: MatchDisplay<WakeupError>,
Box<QuotaViolationError>: MatchDisplay<WakeupError>,
ReassignmentInProgressError: MatchDisplay<WakeupError>,
RebalanceInProgressError: MatchDisplay<WakeupError>,
RebootstrapRequiredError: MatchDisplay<WakeupError>,
RecordBatchTooLargeError: MatchDisplay<WakeupError>,
Box<RecordDeserializationError>: MatchDisplay<WakeupError>,
RecordTooLargeError: MatchDisplay<WakeupError>,
InvalidReceiveError: MatchDisplay<WakeupError>,
ConfigError: MatchDisplay<WakeupError>,
ConsumerRetriableCommitFailedError: MatchDisplay<WakeupError>,
ConsumerCommitFailedError: MatchDisplay<WakeupError>,
ConsumerNoOffsetForPartitionError: MatchDisplay<WakeupError>,
ConsumerOffsetOutOfRangeError: MatchDisplay<WakeupError>,
Box<ConsumerLogTruncationError>: MatchDisplay<WakeupError>,
ReplicaNotAvailableError: MatchDisplay<WakeupError>,
ResourceNotFoundError: MatchDisplay<WakeupError>,
SaslAuthenticationError: MatchDisplay<WakeupError>,
SchemaError: MatchDisplay<WakeupError>,
SecurityDisabledError: MatchDisplay<WakeupError>,
SerializationError: MatchDisplay<WakeupError>,
ShareSessionLimitReachedError: MatchDisplay<WakeupError>,
ShareSessionNotFoundError: MatchDisplay<WakeupError>,
SnapshotNotFoundError: MatchDisplay<WakeupError>,
SslAuthenticationError: MatchDisplay<WakeupError>,
StaleBrokerEpochError: MatchDisplay<WakeupError>,
StaleMemberEpochError: MatchDisplay<WakeupError>,
StreamsInvalidTopologyError: MatchDisplay<WakeupError>,
StreamsInvalidTopologyEpochError: MatchDisplay<WakeupError>,
StreamsTopologyFencedError: MatchDisplay<WakeupError>,
TelemetryTooLargeError: MatchDisplay<WakeupError>,
ThrottlingQuotaExceededError: MatchDisplay<WakeupError>,
TimeoutError: MatchDisplay<WakeupError>,
TopicAuthorizationError: MatchDisplay<WakeupError>,
TopicDeletionDisabledError: MatchDisplay<WakeupError>,
TopicExistsError: MatchDisplay<WakeupError>,
TransactionAbortableError: MatchDisplay<WakeupError>,
TransactionAbortedError: MatchDisplay<WakeupError>,
TransactionCoordinatorFencedError: MatchDisplay<WakeupError>,
TransactionalIdAuthorizationError: MatchDisplay<WakeupError>,
TransactionalIdNotFoundError: MatchDisplay<WakeupError>,
UnacceptableCredentialError: MatchDisplay<WakeupError>,
UnknownControllerIdError: MatchDisplay<WakeupError>,
UnknownLeaderEpochError: MatchDisplay<WakeupError>,
UnknownMemberIdError: MatchDisplay<WakeupError>,
UnknownProducerIdError: MatchDisplay<WakeupError>,
UnknownServerError: MatchDisplay<WakeupError>,
UnknownSubscriptionIdError: MatchDisplay<WakeupError>,
UnknownTopicIdError: MatchDisplay<WakeupError>,
UnknownTopicOrPartitionError: MatchDisplay<WakeupError>,
UnreleasedInstanceIdError: MatchDisplay<WakeupError>,
UnstableOffsetCommitError: MatchDisplay<WakeupError>,
UnsupportedAssignorError: MatchDisplay<WakeupError>,
UnsupportedByAuthenticationError: MatchDisplay<WakeupError>,
UnsupportedCompressionTypeError: MatchDisplay<WakeupError>,
UnsupportedEndpointTypeError: MatchDisplay<WakeupError>,
UnsupportedForMessageFormatError: MatchDisplay<WakeupError>,
UnsupportedSaslMechanismError: MatchDisplay<WakeupError>,
UnsupportedVersionError: MatchDisplay<WakeupError>,
VoterNotFoundError: MatchDisplay<WakeupError>,
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The standard-library view of Java’s Throwable.getCause(), so
{:#}-style reporters and anyhow-style chains walk the cause chain.