Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ContentNotFoundError kills the process #126

Open
liviuignat opened this issue Apr 1, 2019 · 4 comments
Open

ContentNotFoundError kills the process #126

liviuignat opened this issue Apr 1, 2019 · 4 comments

Comments

@liviuignat
Copy link

Hi,

With the latest version we've seen that ContentNotFoundError error kills the process. To be safe we added ignore: [/.*/] just to ignore all errors that might kill the process, but it would be nice to still have an ability to log them.

if (Array.isArray(err)) {
      // check ignore warnings array before killing child
      if (options.ignore && options.ignore instanceof Array) {
        var ignoreError = false;
        options.ignore.forEach(function(opt) {
          err.forEach(function(error) {
            if (typeof opt === 'string' && opt === error) {
              ignoreError = true;
            }
            if (opt instanceof RegExp && error.match(opt)) {
              ignoreError = true;
            }
          });
        });
        if (ignoreError) {
          return true; // ---->>>> maybe still throw a callback where errors can be logged here and then return.
        }
      }
      errObj = new Error(err.join('\n'));
    } else if (err) {
      errObj =  new Error(err);
    }
@liviuignat
Copy link
Author

@devongovett ping?

@yurks
Copy link
Contributor

yurks commented Feb 27, 2021

fixed here #133

@liviuignat
Copy link
Author

The PR #133 is open for 1 year? 😃 @yurks @devongovett

@yurks
Copy link
Contributor

yurks commented Jul 25, 2022

sorry about that, have no Idea how I missed(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants