We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a7f7b1 commit e7f725cCopy full SHA for e7f725c
1 file changed
src/common/exceptions/exception.factory.ts
@@ -31,9 +31,8 @@ export const createException = () => {
31
constructor(arg?: ExceptionParams<K>) {
32
super(statusCode, defaultMessage, code);
33
34
- if (arg) {
35
- this.message = composeExceptionMessage(defaultMessage, arg) as K;
36
- }
+ const composed = composeExceptionMessage(defaultMessage, arg ?? {});
+ this.message = (composed || code) as K;
37
}
38
};
39
0 commit comments