This commit is contained in:
2025-12-16 13:53:23 +01:00
parent 84f05598a6
commit 29dc11deb9
127 changed files with 538 additions and 547 deletions

View File

@@ -8,7 +8,7 @@ import type { AsyncUseCase } from '@core/shared/application';
import type { Logger } from '@core/shared/application';
import { PageView } from '../../domain/entities/PageView';
import type { EntityType, VisitorType } from '../../domain/types/PageView';
import type { IPageViewRepository } from '../../domain/repositories/IPageViewRepository';
import type { IPageViewRepository } from '../repositories/IPageViewRepository';
export interface RecordPageViewInput {
entityType: EntityType;
@@ -57,7 +57,8 @@ export class RecordPageViewUseCase
this.logger.info('Page view recorded successfully', { pageViewId, input });
return { pageViewId };
} catch (error) {
this.logger.error('Error recording page view', error, { input });
const err = error instanceof Error ? error : new Error(String(error));
this.logger.error('Error recording page view', err, { input });
throw error;
}
}