['p5', 'r', 'p6', 'y', 'p', 'j4', 'e', 's6', 'j1', 'b4'], occasionally this error below is thrown. It's an assertion error. I'm unable to catch it, so it crashes my app. It seems like it would be better if instead of throwing an assertion error, the error message could just end up in the err object in the callback?
assert.js:92
throw new assert.AssertionError({
^
AssertionError: CSV column mis-alignment error
at /Users/joeyvmason/Development/finance/finance/node_modules/yahoo-finance/lib/index.js:320:11
at Function.map (/Users/joeyvmason/Development/finance/finance/node_modules/yahoo-finance/node_modules/lodash/dist/lodash.js:3250:27)
at /Users/joeyvmason/Development/finance/finance/node_modules/yahoo-finance/lib/index.js:296:23
at null.<anonymous> (/Users/joeyvmason/Development/finance/finance/node_modules/csv/lib/to.js:277:14)
at EventEmitter.emit (events.js:95:17)
at null.<anonymous> (/Users/joeyvmason/Development/finance/finance/node_modules/csv/lib/index.js:214:17)
at EventEmitter.emit (events.js:92:17)
at Transformer.end (/Users/joeyvmason/Development/finance/finance/node_modules/csv/lib/transformer.js:241:17)
at null.<anonymous> (/Users/joeyvmason/Development/finance/finance/node_modules/csv/lib/index.js:198:29)
at EventEmitter.emit (events.js:95:17)
When retrieving these fields,
['p5', 'r', 'p6', 'y', 'p', 'j4', 'e', 's6', 'j1', 'b4']
, occasionally this error below is thrown. It's an assertion error. I'm unable to catch it, so it crashes my app. It seems like it would be better if instead of throwing an assertion error, the error message could just end up in the err object in the callback?The code:
The error message: