Skip to content

fix export query for typeorm 1; await call to avoid crash - #3299

Open
bcb37 wants to merge 2 commits into
release/6.6from
hotfix/crashing-export-query
Open

fix export query for typeorm 1; await call to avoid crash#3299
bcb37 wants to merge 2 commits into
release/6.6from
hotfix/crashing-export-query

Conversation

@bcb37

@bcb37 bcb37 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@bcb37
bcb37 requested review from danoswaltCL and a lite review from Copilot August 27, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the analytics CSV export path to be compatible with TypeORM 1.x and to avoid export crashes caused by an un-awaited async call.

Changes:

  • Await sendExportData(...) so exportCSVData(...) properly propagates failures instead of creating unhandled promise rejections.
  • Update the export log query to use getRawMany() (instead of .execute()) and adjust how the logs.userId filter is applied.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/backend/src/api/services/AnalyticsService.ts Awaits the export task to ensure errors propagate correctly and prevent crash/unhandled rejections.
packages/backend/src/api/repositories/LogRepository.ts Updates the export query builder to fetch raw SELECT results correctly under TypeORM 1.x and refines filtering logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/backend/src/api/repositories/LogRepository.ts
@bcb37 bcb37 added the hotfix label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants