Skip to content

Commit

Permalink
admin: fixed mapping of service unavailable error code
Browse files Browse the repository at this point in the history
Previously the service_unavailable error code was mapped to generic
unexpected server error. This lead to a situation in which a lot of
errors were logged when broker was restarted as it has an RPC server
running but without the services registered. Changed the mapping of
`rpc::errc::service_unavailable` to HTTP service unavailable error.

Fixes: redpanda-data#17739

Signed-off-by: Michał Maślanka <michal@redpanda.com>
  • Loading branch information
mmaslankaprv committed Apr 26, 2024
1 parent 4182b85 commit 1a9f248
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v/redpanda/admin/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ ss::future<> admin_server::throw_on_error(
case rpc::errc::disconnected_endpoint:
case rpc::errc::exponential_backoff:
case rpc::errc::shutting_down:
case rpc::errc::service_unavailable:
case rpc::errc::missing_node_rpc_client:
throw ss::httpd::base_exception(
fmt::format("Not ready: {}", ec.message()),
Expand All @@ -1130,7 +1131,6 @@ ss::future<> admin_server::throw_on_error(
case rpc::errc::service_error:
case rpc::errc::method_not_found:
case rpc::errc::version_not_supported:
case rpc::errc::service_unavailable:
case rpc::errc::unknown:
throw ss::httpd::server_error_exception(
fmt::format("Unexpected error: {}", ec.message()));
Expand Down

0 comments on commit 1a9f248

Please sign in to comment.