flowfi icon indicating copy to clipboard operation
flowfi copied to clipboard

[fix] Terminate accounting export responses after streaming errors

Open K1NGD4VID opened this issue 1 month ago • 8 comments

Labels: bug, backend, points: 150 File/location: backend/src/services/export.service.ts:222

Description: Both exporters write headers/body before database work; their catch blocks only respond when headersSent is false. A database/mapping failure after the first write leaves the HTTP response open indefinitely.

Acceptance Criteria:

  • [ ] Terminate or destroy an already-started export response when database access or record mapping fails; do not leave the socket pending.
  • [ ] Inject failures before the first record and mid-export for CSV and JSON, and assert deterministic response completion without an unhandled error.

Notes: Injected a database failure into both real exporters after their first write; both returned with headersSent=true and no end/destroy.

Audited commit: 649b6976a100fd964ce191428eef1faeb50aaa39. Closest prior issues reviewed: #1191, #819. This report concerns the specific failure or uncovered test paths described above, rather than repeating the original feature request.

K1NGD4VID avatar Oct 21 '26 17:10 K1NGD4VID

@iyiade08 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

Hello, I’d be interested in contributing to this issue and would appreciate the chance to work on it. Thank you for considering my application.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @iyiade08 to this issue.

iyiade08 avatar Oct 21 '26 21:10 iyiade08

@d3vobed has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

i can resolve this issue please assign

ℹ️ Repo Maintainers: To accept this application, review their application or assign @d3vobed to this issue.

d3vobed avatar Oct 21 '26 21:10 d3vobed

@fasinamercyoluwagbeminiyi124-stack has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I have thoroughly reviewed the issue and understand its requirements. I am confident in my ability to deliver an effective solution that meets the project's expectations and would appreciate being assigned to work on it.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @fasinamercyoluwagbeminiyi124-stack to this issue.

@Rampop01 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I would like to work on this issue . I understand the assignment and the requirements, and I’m confident in the approach needed to deliver the best solution. Kindly assign this task to me.

ℹ️ Repo Maintainers: To accept this application, review their application or assign @Rampop01 to this issue.

Rampop01 avatar Oct 21 '26 22:10 Rampop01

@intelliDean has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

I'd like to work on this issue

ℹ️ Repo Maintainers: To accept this application, review their application or assign @intelliDean to this issue.

intelliDean avatar Oct 21 '26 22:10 intelliDean

Congratulations, @Rampop01! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

🧑‍💻 @Rampop01: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

🌊 Happy Wave 🌊

drips-wave[bot] avatar Oct 21 '26 22:10 drips-wave[bot]

Hi @LabsCrypt team, I have completed the fix for this issue in branch https://github.com/Rampop01/flowfi/tree/fix/issues-1698-1699-1700-1701. However, opening a pull request to LabsCrypt/flowfi is currently restricted with 'must be a collaborator'. Could you please send a repository collaboration invite or lift the restriction so I can submit the PR? Thanks!

Queenode avatar Oct 21 '26 23:10 Queenode

This issue has been completed by @Rampop01 as part of the Stellar Wave Program's 10th Wave 🥳

😎 @Rampop01: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

drips-wave[bot] avatar Oct 22 '26 05:10 drips-wave[bot]