core: handler.onerror: pass error detail

This commit is contained in:
undefined committed 2021-12-21 18:44:51 +08:00
1 parent c577165790
commit ffee671183
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.2.24",
"version": "3.2.25",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
+2 -2
View File
@@ -725,8 +725,8 @@ async function handle(ctx, HandlerClass, checker) {
await bail('handler/finish', h);
} catch (e) {
try {
await bail(`handler/error/${HandlerClass.name.replace(/Handler$/, '')}`, h);
await bail('handler/error', h);
await bail(`handler/error/${HandlerClass.name.replace(/Handler$/, '')}`, h, e);
await bail('handler/error', h, e);
await h.onerror(e);
} catch (err) {
h.response.code = 500;