added modified programs

This commit is contained in:
2026-01-28 19:05:51 -06:00
parent 9bcdcb9d44
commit d4bce28fdf
5 changed files with 145 additions and 16 deletions
+7 -1
View File
@@ -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();
}