refactor
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
import type { AsyncUseCase } from '@core/shared/application';
|
||||
import type { INotificationRepository } from '../../domain/repositories/INotificationRepository';
|
||||
import { NotificationDomainError } from '../../domain/errors/NotificationDomainError';
|
||||
import type { Logger } from '../../../shared/src/logging/Logger';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
export interface MarkNotificationReadCommand {
|
||||
notificationId: string;
|
||||
@@ -44,7 +44,7 @@ export class MarkNotificationReadUseCase implements AsyncUseCase<MarkNotificatio
|
||||
await this.notificationRepository.update(updatedNotification);
|
||||
this.logger.info(`Notification ${command.notificationId} successfully marked as read.`);
|
||||
} catch (error) {
|
||||
this.logger.error(`Failed to mark notification ${command.notificationId} as read: ${error.message}`);
|
||||
this.logger.error(`Failed to mark notification ${command.notificationId} as read: ${error instanceof Error ? error.message : String(error)}`);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user