feat: Hiding stack traces in production env
This commit is contained in:
parent
05fff8d4d6
commit
8fc0a3b590
|
|
@ -12,5 +12,9 @@ export class FastifyReplyError extends Error {
|
|||
super(message);
|
||||
this.message = message;
|
||||
this.statusCode = statusCode;
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
Object.defineProperty(this, 'stack', { value: '' });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue