Fix : allow services to throw httpException errors
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user