Skip to content

Commit

Permalink
kafka/server: map_topic_error_code map no_leader_controller
Browse files Browse the repository at this point in the history
Instead of returning `unknown_server_error`, return `not_controller`

This is a retriable error code, with metadata refresh.

Fixes redpanda-data#2406

Signed-off-by: Ben Pope <ben@vectorized.io>
  • Loading branch information
BenPope committed Sep 24, 2021
1 parent 2633fe0 commit af7fa37
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/v/kafka/server/errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ constexpr error_code map_topic_error_code(cluster::errc code) {
case cluster::errc::notification_wait_timeout:
return error_code::request_timed_out;
case cluster::errc::not_leader_controller:
case cluster::errc::no_leader_controller:
return error_code::not_controller;
case cluster::errc::topic_already_exists:
return error_code::topic_already_exists;
Expand Down

0 comments on commit af7fa37

Please sign in to comment.