0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 04:38:52 +02:00

modules/s_fetch: Log errors from the fetch hook handler.

This commit is contained in:
Jason Volk 2019-04-22 18:34:51 -07:00
parent ee6760a655
commit 4b3a828c01

View file

@ -348,6 +348,7 @@ ircd::m::fetch::for_each(const std::function<bool (request &)> &closure)
void
ircd::m::fetch::hook_handler(const event &event,
vm::eval &eval)
try
{
assert(eval.opts);
assert(eval.opts->fetch);
@ -539,6 +540,18 @@ ircd::m::fetch::hook_handler(const event &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