Skip to content

Commit

Permalink
rpc: add type info to error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnwat committed Jul 25, 2022
1 parent 506fe16 commit 43a2102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/v/rpc/service.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,12 @@ struct service::execution_helper {
*/
vassert(
effective_version == version,
"Unexpected encoding at effective {} != {}",
"Unexpected encoding at effective {} != {}. Input "
"{} Output {}",
effective_version,
version);
version,
typeid(Input).name(),
typeid(Output).name());
return std::move(*b);
});
});
Expand Down
5 changes: 3 additions & 2 deletions src/v/rpc/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@ ss::future<result<rpc::client_context<T>>> parse_result(
vlog(
rpclog.error,
"Protocol violation: request version {} incompatible with "
"reply version {}",
"reply version {} reply type {}",
req_ver,
rep_ver);
rep_ver,
typeid(T).name());
}
if (st == status::success) {
return ss::make_ready_future<ret_t>(errc::service_error);
Expand Down

0 comments on commit 43a2102

Please sign in to comment.