added modified programs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import {
|
||||
BadRequestException,
|
||||
HttpException,
|
||||
Injectable,
|
||||
InternalServerErrorException,
|
||||
} from '@nestjs/common';
|
||||
@@ -65,7 +66,12 @@ export class OperationsService {
|
||||
return { message: 'correct' };
|
||||
} catch (error) {
|
||||
await queryRunner.rollbackTransaction();
|
||||
throw new InternalServerErrorException(error.message);
|
||||
|
||||
if (error instanceof HttpException) {
|
||||
throw error;
|
||||
}
|
||||
|
||||
throw new InternalServerErrorException('Error al realizar el cobro');
|
||||
} finally {
|
||||
await queryRunner.release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user