mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +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;
|
||||
}
|
||||
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},
|
||||
keyid,
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue