mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd:Ⓜ️ Improve error propagation through verify().
This commit is contained in:
parent
a4447054e5
commit
9af12a26e3
1 changed files with 16 additions and 5 deletions
|
@ -461,18 +461,29 @@ try
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
catch(const m::NOT_FOUND &e)
|
catch(const ctx::interrupted &e)
|
||||||
{
|
{
|
||||||
log::derror
|
log::error
|
||||||
{
|
{
|
||||||
"Failed to verify %s because key %s for %s :%s",
|
log, "Failed to verify %s because key %s for %s :%s",
|
||||||
string_view{event.event_id},
|
string_view{event.event_id},
|
||||||
keyid,
|
keyid,
|
||||||
origin,
|
origin,
|
||||||
e.what()
|
e.what(),
|
||||||
};
|
};
|
||||||
|
|
||||||
return false;
|
throw;
|
||||||
|
}
|
||||||
|
catch(const std::exception &e)
|
||||||
|
{
|
||||||
|
throw m::BAD_SIGNATURE
|
||||||
|
{
|
||||||
|
"%s key %s for %s :%s",
|
||||||
|
string_view{event.event_id},
|
||||||
|
keyid,
|
||||||
|
origin,
|
||||||
|
e.what(),
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Reference in a new issue