caolan / caolan/highland

How to propagate downstream errors to the source?

Open
#602 5 comments 0 reactions 0 assignees View on GitHub
3.x
Dominant language
JavaScript
Stars
3.4k
Forks
145
PR merge metrics
No merged PRs in 30d

Description

I'm currently using highland to transform and write rows coming from a database query. I need to release the database connection to a pool when all the rows have streamed through.

Right now, I just observe the source stream and release the connection when the stream is done. This works great.

However, if there's an error thrown somewhere downstream (either in the processing pipeline, or when writing), I want to be notified at the source, that way I can stop pulling rows and release the connection.

So, is there a mechanism to propagate downstream errors to the source?

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing Highland's source-stream observation and downstream error-handling behavior, then check whether existing tests cover errors during processing or writing. Done would require a clearly scoped, verified mechanism for notifying the source and releasing the database connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
stream-processing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.