Skip to content

Commit

Permalink
chore: log error properly (#6596)
Browse files Browse the repository at this point in the history
## 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
  • Loading branch information
gastonfournier committed Mar 18, 2024
1 parent 3539f3d commit 26e696a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib/features/events/event-store.ts
Expand Up @@ -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,
);
}
}

Expand Down

0 comments on commit 26e696a

Please sign in to comment.