mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
modules/client/profile: Wrap and rethrow remote http error in m::error here.
This commit is contained in:
parent
ec96b6564b
commit
dc47cc7a93
1 changed files with 9 additions and 2 deletions
|
@ -270,9 +270,16 @@ try
|
|||
{
|
||||
std::rethrow_exception(eptr);
|
||||
}
|
||||
catch(const http::error &)
|
||||
catch(const http::error &e)
|
||||
{
|
||||
throw;
|
||||
throw m::error
|
||||
{
|
||||
e.code, "M_UNKNOWN",
|
||||
"Server '%s' responded to profile request for %s with :%s",
|
||||
user.user_id.host(),
|
||||
string_view{user.user_id},
|
||||
e.content
|
||||
};
|
||||
}
|
||||
catch(const ctx::timeout &)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue