Skip to content

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

@orangejulius

Description

@orangejulius

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions