linting
This commit is contained in:
@@ -32,7 +32,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
}
|
||||
return transaction;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding transaction by id ${id}:`, error);
|
||||
this.logger.error(`Error finding transaction by id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.info(`Found ${transactions.length} transactions for wallet id: ${walletId}.`);
|
||||
return transactions;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding transactions by wallet id ${walletId}:`, error);
|
||||
this.logger.error(`Error finding transactions by wallet id ${walletId}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.info(`Found ${transactions.length} transactions of type: ${type}.`);
|
||||
return transactions;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error finding transactions by type ${type}:`, error);
|
||||
this.logger.error(`Error finding transactions by type ${type}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -72,7 +72,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.info(`Transaction ${transaction.id} created successfully.`);
|
||||
return transaction;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error creating transaction ${transaction.id}:`, error);
|
||||
this.logger.error(`Error creating transaction ${transaction.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.info(`Transaction ${transaction.id} updated successfully.`);
|
||||
return transaction;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error updating transaction ${transaction.id}:`, error);
|
||||
this.logger.error(`Error updating transaction ${transaction.id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.warn(`Transaction with id ${id} not found for deletion.`);
|
||||
}
|
||||
} catch (error) {
|
||||
this.logger.error(`Error deleting transaction ${id}:`, error);
|
||||
this.logger.error(`Error deleting transaction ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -114,7 +114,7 @@ export class InMemoryTransactionRepository implements ITransactionRepository {
|
||||
this.logger.debug(`Transaction ${id} exists: ${exists}.`);
|
||||
return exists;
|
||||
} catch (error) {
|
||||
this.logger.error(`Error checking existence of transaction with id ${id}:`, error);
|
||||
this.logger.error(`Error checking existence of transaction with id ${id}:`, error instanceof Error ? error : new Error(String(error)));
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user