Currently we do not return an error in the OffsetsForLeaderEpoch request for followers and for non-replicas, we return UNKNOWN_TOPIC_OR_PARTITION. We should return NOT_LEADER_FOR_PARTITION for both cases.
This patch also fixes a minor bug in the handling of ListOffsets request using the DEBUG replica id. We should return UNKNOWN_TOPIC_OR_PARTITION if the topic doesn't exist. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) [ Full content available at: https://github.com/apache/kafka/pull/5576 ] This message was relayed via gitbox.apache.org for [email protected]
