fix tests ugh
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 5m55s

This commit is contained in:
2025-12-09 18:18:56 -08:00
parent b3372b6fa3
commit 4674309ea1
6 changed files with 67 additions and 89 deletions

View File

@@ -269,11 +269,11 @@ export class PersonalizationRepository {
await client.query('COMMIT');
return newAppliances;
} catch (error) {
await client.query('ROLLBACK');
// The patch requested this specific error handling.
if ((error as any).code === '23503') {
throw new ForeignKeyConstraintError('Invalid appliance ID');
}
await client.query('ROLLBACK');
logger.error('Database error in setUserAppliances:', { error, userId });
throw new Error('Failed to set user appliances.');
} finally {