Skip to content

Commit d9c1a41

Browse files
committed
pkg/kerr: add new errors
Does not yet add telemetry errors, which are not yet released.
1 parent 54d3032 commit d9c1a41

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

pkg/kerr/kerr.go

+16-1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,13 @@ var (
183183
IneligibleReplica = &Error{"INELIGIBLE_REPLICA", 107, false, "The new ISR contains at least one ineligible replica."}
184184
NewLeaderElected = &Error{"NEW_LEADER_ELECTED", 108, false, "The AlterPartition request successfully updated the partition state but the leader has changed."}
185185
OffsetMovedToTieredStorage = &Error{"OFFSET_MOVED_TO_TIERED_STORAGE", 109, false, "The requested offset is moved to tiered storage."}
186+
FencedMemberEpoch = &Error{"FENCED_MEMBER_EPOCH", 110, false, "The member epoch is fenced by the group coordinator. The member must abandon all its partitions and rejoin."}
187+
UnreleasedInstanceID = &Error{"UNRELEASED_INSTANCE_ID", 111, false, "The instance ID is still used by another member in the consumer group. That member must leave first."}
188+
UnsupportedAssignor = &Error{"UNSUPPORTED_ASSIGNOR", 112, false, "The assignor or its version range is not supported by the consumer group."}
189+
StaleMemberEpoch = &Error{"STALE_MEMBER_EPOCH", 113, false, "The member epoch is stale. The member must retry after receiving its updated member epoch via the ConsumerGroupHeartbeat API."}
190+
MismatchedEndpointType = &Error{"MISMATCHED_ENDPOINT_TYPE", 114, false, "The request was sent to an endpoint of the wrong type."}
191+
UnsupportedEndpointType = &Error{"UNSUPPORTED_ENDPOINT_TYPE", 115, false, "This endpoint type is not supported yet."}
192+
UnknownControllerID = &Error{"UNKNOWN_CONTROLLER_ID", 116, false, "This controller ID is not known"}
186193
)
187194

188195
var code2err = map[int16]error{
@@ -296,5 +303,13 @@ var code2err = map[int16]error{
296303
106: FetchSessionTopicIDError,
297304
107: IneligibleReplica,
298305
108: NewLeaderElected,
299-
109: OffsetMovedToTieredStorage,
306+
109: OffsetMovedToTieredStorage, // KIP-405, v3.5
307+
110: FencedMemberEpoch, // KIP-848, released unstable in v3.6, stable in 3.7
308+
111: UnreleasedInstanceID, // ""
309+
112: UnsupportedAssignor, // ""
310+
113: StaleMemberEpoch, // ""
311+
114: MismatchedEndpointType, // KIP-919, v3.7
312+
115: UnsupportedEndpointType, // ""
313+
116: UnknownControllerID, // ""
314+
300315
}

0 commit comments

Comments
 (0)