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 <dordille@gmail.com>
  • Loading branch information
dordille authored and alanshaw committed Aug 17, 2018
1 parent 34f6488 commit a5eb1e7
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 a5eb1e7

Please sign in to comment.