This commit is contained in:
2025-12-16 13:53:23 +01:00
parent 84f05598a6
commit 29dc11deb9
127 changed files with 538 additions and 547 deletions

View File

@@ -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;
}
}