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

All errors on import stream are caught and not surfaced #238

Open
orangejulius opened this issue Sep 18, 2017 · 0 comments
Open

All errors on import stream are caught and not surfaced #238

orangejulius opened this issue Sep 18, 2017 · 0 comments

Comments

@orangejulius
Copy link
Member

orangejulius commented Sep 18, 2017

The geonames-stream module used in this importer creates a stream that handles all stream errors by printing them to stderr but then continuing on with the import:

  var parser = unzip.Parse();

  parser
    .on( 'error', console.error.bind( console ) )
    .on( 'entry', function( entry ) {
      // skip readme files
      if( entry.props.path.match( 'readme' ) ){
        return entry.autodrain();
      }
      return entry.pipe( output );
});

Many errors that can happen during an import are non-recoverable, but the importer returns a status-code zero in these cases, meaning no build tools working with it can detect that anything went wrong.

This was noticed while debugging issues related to #26

@dianashk dianashk added this to the Importers milestone Oct 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants