Description returns a human readable description of cause of the error.
()
| 385 | |
| 386 | // Description returns a human readable description of cause of the error. |
| 387 | func (e Error) Description() string { |
| 388 | switch e { |
| 389 | case Unknown: |
| 390 | return "an unexpected server error occurred" |
| 391 | case OffsetOutOfRange: |
| 392 | return "the requested offset is outside the range of offsets maintained by the server for the given topic/partition" |
| 393 | case InvalidMessage: |
| 394 | return "the message contents does not match its CRC" |
| 395 | case UnknownTopicOrPartition: |
| 396 | return "the request is for a topic or partition that does not exist on this broker" |
| 397 | case InvalidMessageSize: |
| 398 | return "the message has a negative size" |
| 399 | case LeaderNotAvailable: |
| 400 | return "the cluster is in the middle of a leadership election and there is currently no leader for this partition and hence it is unavailable for writes" |
| 401 | case NotLeaderForPartition: |
| 402 | return "the client attempted to send messages to a replica that is not the leader for some partition, the client's metadata are likely out of date" |
| 403 | case RequestTimedOut: |
| 404 | return "the request exceeded the user-specified time limit in the request" |
| 405 | case BrokerNotAvailable: |
| 406 | return "not a client facing error and is used mostly by tools when a broker is not alive" |
| 407 | case ReplicaNotAvailable: |
| 408 | return "a replica is expected on a broker, but is not (this can be safely ignored)" |
| 409 | case MessageSizeTooLarge: |
| 410 | return "the server has a configurable maximum message size to avoid unbounded memory allocation and the client attempted to produce a message larger than this maximum" |
| 411 | case StaleControllerEpoch: |
| 412 | return "internal error code for broker-to-broker communication" |
| 413 | case OffsetMetadataTooLarge: |
| 414 | return "the client specified a string larger than configured maximum for offset metadata" |
| 415 | case GroupLoadInProgress: |
| 416 | return "the broker returns this error code for an offset fetch request if it is still loading offsets (after a leader change for that offsets topic partition), or in response to group membership requests (such as heartbeats) when group metadata is being loaded by the coordinator" |
| 417 | case GroupCoordinatorNotAvailable: |
| 418 | return "the broker returns this error code for group coordinator requests, offset commits, and most group management requests if the offsets topic has not yet been created, or if the group coordinator is not active" |
| 419 | case NotCoordinatorForGroup: |
| 420 | return "the broker returns this error code if it receives an offset fetch or commit request for a group that it is not a coordinator for" |
| 421 | case InvalidTopic: |
| 422 | return "a request which attempted to access an invalid topic (e.g. one which has an illegal name), or if an attempt was made to write to an internal topic (such as the consumer offsets topic)" |
| 423 | case RecordListTooLarge: |
| 424 | return "a message batch in a produce request exceeds the maximum configured segment size" |
| 425 | case NotEnoughReplicas: |
| 426 | return "the number of in-sync replicas is lower than the configured minimum and requiredAcks is -1" |
| 427 | case NotEnoughReplicasAfterAppend: |
| 428 | return "the message was written to the log, but with fewer in-sync replicas than required." |
| 429 | case InvalidRequiredAcks: |
| 430 | return "the requested requiredAcks is invalid (anything other than -1, 1, or 0)" |
| 431 | case IllegalGeneration: |
| 432 | return "the generation id provided in the request is not the current generation" |
| 433 | case InconsistentGroupProtocol: |
| 434 | return "the member provided a protocol type or set of protocols which is not compatible with the current group" |
| 435 | case InvalidGroupId: |
| 436 | return "the group id is empty or null" |
| 437 | case UnknownMemberId: |
| 438 | return "the member id is not in the current generation" |
| 439 | case InvalidSessionTimeout: |
| 440 | return "the requested session timeout is outside of the allowed range on the broker" |
| 441 | case RebalanceInProgress: |
| 442 | return "the coordinator has begun rebalancing the group, the client should rejoin the group" |
| 443 | case InvalidCommitOffsetSize: |
| 444 | return "an offset commit was rejected because of oversize metadata" |
no outgoing calls