mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: better disconnect notification
This commit is contained in:
1 parent
2fe5b8faee
commit
0301de94cf
5 files changed
+30
-29
No files matched your search
@@ -649,7 +649,7 @@ export class Handler extends HandlerCommon {
|
||||
if (!error.msg) error.msg = () => error.message;
|
||||
if (error instanceof UserFacingError && !process.env.DEV) error.stack = '';
|
||||
if (!(error instanceof NotFoundError)) {
|
||||
logger.error(`User: ${this.user._id}(${this.user.uname}) Path: ${this.request.path}`, error.msg(), error.params);
|
||||
logger.error(`User: ${this.user._id}(${this.user.uname}) ${this.request.method}: ${this.request.path}`, error.msg(), error.params);
|
||||
if (error.stack) logger.error(error.stack);
|
||||
}
|
||||
if (this.user?._id === 0 && (error instanceof PermissionError || error instanceof PrivilegeError)) {
|
||||
|
||||
Reference in new issue
Block a user