Fix : allow services to throw httpException errors

This commit is contained in:
2024-06-27 19:47:16 +02:00
parent d6ab8bd148
commit d4840eab8b
+3
View File
@@ -33,6 +33,9 @@ function WithTransaction(
return originalFunc.apply(this, [...args, session]); return originalFunc.apply(this, [...args, session]);
}) })
.catch((e) => { .catch((e) => {
if(e instanceof HttpException){
throw e
}
throw new HttpException( throw new HttpException(
'Another request is processing', 'Another request is processing',
HttpStatus.TOO_MANY_REQUESTS, HttpStatus.TOO_MANY_REQUESTS,