1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

chore: log error properly (#6596)

## About the changes
We see some logs with: `Failed to store events: Error: The query is
empty` which suggests we're not sending events to batchStore. This will
help us confirm that and will give us better insights
This commit is contained in:
Gastón Fournier 2024-03-18 17:11:36 +01:00 committed by GitHub
parent 3539f3db02
commit 26e696a090
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -158,7 +158,10 @@ class EventStore implements IEventStore {
try {
await this.db(TABLE).insert(events.map(this.eventToDbRow));
} catch (error: unknown) {
this.logger.warn(`Failed to store events: ${error}`);
this.logger.warn(
`Failed to store events: ${JSON.stringify(events)}`,
error,
);
}
}