fix: packets
This commit is contained in:
parent
e0cebbf865
commit
3d7db1a001
|
@ -23,7 +23,7 @@ export default (latus, [name, Packet]) => class LimitedPacket extends Packet {
|
|||
throw error;
|
||||
}
|
||||
if (super.validate) {
|
||||
super.validate(packet, socket);
|
||||
await super.validate(packet, socket);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,12 @@ export default {
|
|||
return;
|
||||
}
|
||||
if (error instanceof Error) {
|
||||
fn({code: 500, ...('production' === NODE_ENV ? {} : {stack: error.stack})});
|
||||
fn({
|
||||
code: error.code || 500,
|
||||
reason: error.message,
|
||||
...('production' === NODE_ENV ? {} : {stack: error.stack}),
|
||||
});
|
||||
return;
|
||||
}
|
||||
fn(error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user