fix issues in core
This commit is contained in:
@@ -20,7 +20,13 @@ export class DashboardService {
|
||||
async getDashboardOverview(driverId: string): Promise<DashboardOverviewDTO> {
|
||||
this.logger.debug('[DashboardService] Getting dashboard overview:', { driverId });
|
||||
|
||||
await this.dashboardOverviewUseCase.execute({ driverId });
|
||||
const result = await this.dashboardOverviewUseCase.execute({ driverId });
|
||||
|
||||
if (result.isErr()) {
|
||||
const error = result.error;
|
||||
const message = error?.details?.message || 'Unknown error';
|
||||
throw new Error(`Failed to get dashboard overview: ${message}`);
|
||||
}
|
||||
|
||||
return this.presenter.getResponseModel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user