Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
fix(core): catch errors when parsing chunkerstring and return error p…
Browse files Browse the repository at this point in the history
…ull stream

License: MIT
Signed-off-by: Dan Ordille <[email protected]>
  • Loading branch information
dordille authored and alanshaw committed Aug 23, 2018
1 parent 7b38101 commit f9c9d13
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/components/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ class AddHelper extends Duplex {

module.exports = function files (self) {
function _addPullStream (options = {}) {
const chunkerOptions = parseChunkerString(options.chunker)
let chunkerOptions
try {
chunkerOptions = parseChunkerString(options.chunker)
} catch (err) {
return pull.map(() => { throw err })
}
const opts = Object.assign({}, {
shardSplitThreshold: self._options.EXPERIMENTAL.sharding
? 1000
Expand Down

0 comments on commit f9c9d13

Please sign in to comment.