fix: handle internal timeout errors in client Mqueue/Inflight APIs

This commit is contained in:
Serge Tupchii 2024-03-29 13:29:19 +02:00
parent f5a820cb10
commit 42af1f9d63
2 changed files with 15 additions and 1 deletions

View File

@ -713,5 +713,17 @@ call_conn(ConnMod, Pid, Req) ->
exit:{R, _} when R =:= shutdown; R =:= noproc ->
{error, shutdown};
exit:{{shutdown, _OOMInfo}, _Location} ->
{error, shutdown}
{error, shutdown};
exit:timeout ->
?SLOG(
warning,
#{
msg => "call_client_connection_process_timeout",
request => Req,
pid => Pid,
module => ConnMod,
stacktrace => erlang:process_info(Pid, current_stacktrace)
}
),
{error, timeout}
end.

View File

@ -1232,6 +1232,8 @@ list_client_msgs(MsgType, ClientID, QString) ->
code => 'NOT_IMPLEMENTED',
message => <<"API not implemented for persistent sessions">>
}};
{error, Reason} ->
?INTERNAL_ERROR(Reason);
{Msgs, Meta = #{}} when is_list(Msgs) ->
format_msgs_resp(MsgType, Msgs, Meta, QString)
end