diff --git a/src/controllers/04-service-controller.ts b/src/controllers/04-service-controller.ts index 84ff6a1..33797b6 100644 --- a/src/controllers/04-service-controller.ts +++ b/src/controllers/04-service-controller.ts @@ -337,6 +337,12 @@ export class ServiceController extends Controller { ); } } + } else { + throw new HttpError( + HttpStatus.BAD_REQUEST, + "Installments validate failed.", + "installmentsValidateFailed", + ); } const record = await prisma.$transaction( @@ -460,6 +466,12 @@ export class ServiceController extends Controller { ); } } + } else { + throw new HttpError( + HttpStatus.BAD_REQUEST, + "Installments validate failed.", + "installmentsValidateFailed", + ); } const record = await prisma.$transaction(async (tx) => {