ignore non-interesting errors when processing metadata

This commit is contained in:
ansuz 2019-09-06 13:36:06 +02:00
parent dc078c1ca1
commit fe884278f4

View file

@ -195,6 +195,10 @@ Meta.createLineHandler = function (ref, errorHandler) {
return function (err, line) { return function (err, line) {
if (err) { if (err) {
// it's not abnormal that metadata exists without a corresponding log
// so ENOENT is fine
if (ref.index === 0 && err.code === 'ENOENT') { return; }
// any other errors are abnormal
return void errorHandler('METADATA_HANDLER_LINE_ERR', { return void errorHandler('METADATA_HANDLER_LINE_ERR', {
error: err, error: err,
index: ref.index, index: ref.index,