max-mapper / max-mapper/csv-write-stream
Error handling
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 203
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
I want to handle errors with promises. I have promisified pipe method with bluebird, so my code looks like this
```
return writerPipe(
mkdirp(csvPath).catch((error) => {
return Promise.reject('error');
})
)
.then(() => {.....
```
I'm not able to reject or resolve inside mkdrip(it's alternative for createWriteStream).
So actually I want to handle errors for this line and so on.
`csvWriter.pipe(fs.createWriteStream(csvPath));`
if I could call a callback like this `csvWriter.pipe(fs.createWriteStream(csvPath), callback);` It would be grat
What can I do? Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the csvWriter.pipe(fs.createWriteStream(csvPath)) call and the promisified writerPipe usage described in the issue; trace how errors from mkdirp and fs.createWriteStream are currently surfaced. Define completion as making those errors observable through the promise-based flow, then verify the resulting behavior with the repository's existing tests or stream usage examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100