Ticket generation issue resolution

This commit is contained in:
Stephanos A
2026-07-21 22:26:26 +03:00
parent 1f01668fee
commit d524f5b7e4
2 changed files with 10 additions and 3 deletions

View File

@@ -834,9 +834,17 @@ export class PaymentsService {
try {
await this.ticketsService.generate(intent.bookingId);
} catch (err) {
this.logger.error(
`Error generating ticket on idempotency retry for booking ${intent.bookingId}: ${err instanceof Error ? err.message : String(err)}`,
const msg = err instanceof Error ? err.message : String(err);
this.logger.warn(
`Ticket generation failed on idempotency retry for booking ${intent.bookingId}: ${msg}. Attempting smart seat reassignment.`,
);
try {
await this.ticketsService.smartAssignAndGenerate(intent.bookingId);
} catch (retryErr) {
this.logger.error(
`Error generating ticket on idempotency retry for booking ${intent.bookingId}: ${retryErr instanceof Error ? retryErr.message : String(retryErr)}`,
);
}
}
}
return { alreadyFinalized: true };

View File

@@ -507,7 +507,6 @@ export class ReportsService {
NOT: [
{ reason: { startsWith: 'MAINTENANCE:' } },
{ reason: { startsWith: 'Booked in tickets' } },
{ blockedBy: 'system' },
],
},
include: {