linting
This commit is contained in:
@@ -37,7 +37,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
}
|
||||
return team;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding team by id ${id}:`, error);
|
||||
this.logger.error(`Error finding team by id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.logger.info(`Found ${teams.length} teams.`);
|
||||
return teams;
|
||||
} catch (error) {
|
||||
this.logger.error('Error finding all teams:', error);
|
||||
this.logger.error('Error finding all teams:', error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.logger.info(`Found ${teams.length} teams for league id: ${leagueId}.`);
|
||||
return teams;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding teams by league id ${leagueId}:`, error);
|
||||
this.logger.error(`Error finding teams by league id ${leagueId}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.logger.info(`Team ${team.id} created successfully.`);
|
||||
return team;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error creating team ${team.id}:`, error);
|
||||
this.logger.error(`Error creating team ${team.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.logger.info(`Team ${team.id} updated successfully.`);
|
||||
return team;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error updating team ${team.id}:`, error);
|
||||
this.logger.error(`Error updating team ${team.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.teams.delete(id);
|
||||
this.logger.info(`Team ${id} deleted successfully.`);
|
||||
} catch (error) {
|
||||
this.logger.error(`Error deleting team ${id}:`, error);
|
||||
this.logger.error(`Error deleting team ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ export class InMemoryTeamRepository implements ITeamRepository {
|
||||
this.logger.debug(`Team ${id} exists: ${exists}.`);
|
||||
return exists;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error checking existence of team with id ${id}:`, error);
|
||||
this.logger.error(`Error checking existence of team with id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user