mirror of
https://github.com/matrix-construct/construct
synced 2024-12-28 16:34:13 +01:00
modules/s_fetch: Log errors from the fetch hook handler.
This commit is contained in:
parent
ee6760a655
commit
4b3a828c01
1 changed files with 13 additions and 0 deletions
|
@ -348,6 +348,7 @@ ircd::m::fetch::for_each(const std::function<bool (request &)> &closure)
|
||||||
void
|
void
|
||||||
ircd::m::fetch::hook_handler(const event &event,
|
ircd::m::fetch::hook_handler(const event &event,
|
||||||
vm::eval &eval)
|
vm::eval &eval)
|
||||||
|
try
|
||||||
{
|
{
|
||||||
assert(eval.opts);
|
assert(eval.opts);
|
||||||
assert(eval.opts->fetch);
|
assert(eval.opts->fetch);
|
||||||
|
@ -539,6 +540,18 @@ ircd::m::fetch::hook_handler(const event &event,
|
||||||
json::get<"room_id"_>(*eval.event_)
|
json::get<"room_id"_>(*eval.event_)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
catch(const std::exception &e)
|
||||||
|
{
|
||||||
|
log::error
|
||||||
|
{
|
||||||
|
log, "hook handle %s %s :%s",
|
||||||
|
loghead(eval),
|
||||||
|
json::get<"event_id"_>(event),
|
||||||
|
e.what(),
|
||||||
|
};
|
||||||
|
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// request worker
|
// request worker
|
||||||
|
|
Loading…
Reference in a new issue