parquetjs icon indicating copy to clipboard operation
parquetjs copied to clipboard

UnhandledPromiseRejectionWarning on error

Open ZJONSSON opened this issue 7 years ago • 6 comments

If an error occurs in the ParquetTransformer._transform the stream is left in limbo state. Node logs out the following warning:

(node:10265) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): invalid value for INT64: N/A
(node:10265) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

ZJONSSON avatar Feb 02 '18 02:02 ZJONSSON

Just found unhandled promise rejection in ParquetTransformer, line 268:

  _transform(row, encoding, callback) {
    if (row) {
      this.writer.appendRow(row).then(callback);
    } else {
      callback();
    }
  }

burgrp avatar Jul 17 '19 10:07 burgrp

@burgrp you will also find the proposed fix in the reference above, from Feb 1 2018

ZJONSSON avatar Jul 17 '19 23:07 ZJONSSON

Thanks @ZJONSSON . It's a pity, it's not merged yet.

burgrp avatar Jul 18 '19 07:07 burgrp

Any chance of getting this fix merged and new version published ?

ed-sparkes avatar Jul 23 '20 08:07 ed-sparkes

Its a useful change to merge in, and would be very much appreciated to capture the rejection rather than silently dying. Let me now when that would likely to be merged so that i can harden the code.

emranuddin75 avatar Jul 23 '20 13:07 emranuddin75

Does anyone have a workaround to handle promise rejection?

sambonbonne avatar Aug 24 '21 09:08 sambonbonne