Skip to content

Commit ae60a99

Browse files
committed
core: pass rawError to onerror render
1 parent 2a2dfc7 commit ae60a99

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/hydrooj/src/service/server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ export async function apply(ctx: Context) {
233233
this.response.template = error instanceof UserFacingError ? 'error.html' : 'bsod.html';
234234
this.response.body = {
235235
UserFacingError,
236-
error: { message: error.msg(), params: error.params, stack: errorMessage(error.stack || '') },
236+
error: {
237+
message: error.msg(), stack: errorMessage(error.stack || ''),
238+
params: error.params, name: error.name, code: error.code,
239+
},
240+
_rawError: error,
237241
};
238242
}
239243
},

0 commit comments

Comments
 (0)