mirror of
https://github.com/matrix-construct/construct
synced 2025-04-12 04:51:07 +02: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);
|
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 &)
|
catch(const ctx::timeout &)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue