feat: Implement deals repository and routes for fetching best watched item prices
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
Some checks failed
Deploy to Test Environment / deploy-to-test (push) Has been cancelled
- Added a new DealsRepository class to interact with the database for fetching the best sale prices of watched items. - Created a new route `/api/users/deals/best-watched-prices` to handle requests for the best prices of items the authenticated user is watching. - Enhanced logging in the FlyerDataTransformer and FlyerProcessingService for better traceability. - Updated tests to ensure proper logging and functionality in the FlyerProcessingService. - Refactored logger client to support structured logging for better consistency across the application.
This commit is contained in:
@@ -47,7 +47,7 @@ export const VoiceLabPage: React.FC = () => {
|
||||
} catch (error) {
|
||||
console.error('[VoiceLabPage] Error caught:', error);
|
||||
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred.';
|
||||
logger.error('Failed to generate speech:', { error: errorMessage });
|
||||
logger.error({ err: error }, 'Failed to generate speech:');
|
||||
notifyError(`Speech generation failed: ${errorMessage}`);
|
||||
} finally {
|
||||
console.log('[VoiceLabPage] finally block - setting isGeneratingSpeech false');
|
||||
@@ -66,7 +66,7 @@ export const VoiceLabPage: React.FC = () => {
|
||||
});
|
||||
} catch (error) {
|
||||
const errorMessage = error instanceof Error ? error.message : 'An unknown error occurred.';
|
||||
logger.error('Failed to start voice session:', { error: errorMessage });
|
||||
logger.error({ err: error }, 'Failed to start voice session:');
|
||||
notifyError(`Could not start voice session: ${errorMessage}`);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user