refactor
This commit is contained in:
@@ -5,7 +5,6 @@ import type {
|
||||
AllTeamsResultDTO,
|
||||
} from '../presenters/IAllTeamsPresenter';
|
||||
import type { UseCase } from '@core/shared/application';
|
||||
import type { Team } from '../../domain/entities/Team';
|
||||
import { Logger } from "@core/shared/application";
|
||||
|
||||
/**
|
||||
@@ -54,7 +53,7 @@ export class GetAllTeamsUseCase
|
||||
presenter.present(dto);
|
||||
this.logger.info('Successfully retrieved all teams.');
|
||||
} catch (error) {
|
||||
this.logger.error('Error retrieving all teams:', error);
|
||||
this.logger.error('Error retrieving all teams', error instanceof Error ? error : new Error(String(error)));
|
||||
throw error; // Re-throw the error after logging
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user