bausmeier/node-bitx

{ [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' }

Closed this issue · 2 comments

dutu commented

Following error is returned
{ [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' }

Code:

var BitX = require('bitx');
exports.getr = function(req, res){
    var vbitx = new BitX();
    vbitx.getTrades(function(err,result){
        console.log(err);
    });
};

If I run that code I don't get an error and console.log(result); prints the trades as I would expect. Is there anything else you are doing differently? Could it be a network issue?

Stack trace:

Error: Parse Error
    at CleartextStream.socketOnData (http.js:1583:20)
    at CleartextStream.read [as _read] (tls.js:511:12)
    at CleartextStream.Readable.read (_stream_readable.js:320:10)
    at EncryptedStream.write [as _write] (tls.js:366:25)
    at doWrite (_stream_writable.js:223:10)
    at writeOrBuffer (_stream_writable.js:213:5)
    at EncryptedStream.Writable.write (_stream_writable.js:180:11)
    at write (_stream_readable.js:583:24)
    at flow (_stream_readable.js:592:7)
    at Socket.pipeOnReadable (_stream_readable.js:624:5)