zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

I got error err.match is not a function in bitfinex/exchange.js

Open nao0811ta opened this issue 9 years ago • 6 comments

/home/ec2-user/workspace/zen4 -bit-2/extensions/exchanges/bitfinex/exchange.js:148 if (err && err.match(/Error: Invalid order: not enough exchange balance$/)) { ^

TypeError: err.match is not a function at /home/ec2-user/workspace/zen4-bit-2/extensions/exchanges/bitfinex/exchange.js:148:24 at Request.request [as _callback] (/home/ec2-user/workspace/zen4-bit-2/node_modules/bitfinex-api-node/rest.js:61:14) at Request.self.callback (/home/ec2-user/workspace/zen4-bit-2/node_modules/request/request.js:188:22) at emitTwo (events.js:106:13) at Request.emit (events.js:194:7) at Request. (/home/ec2-user/workspace/zen4-bit-2/node_modules/request/request.js:1171:10) at emitOne (events.js:96:13) at Request.emit (events.js:191:7) at IncomingMessage. (/home/ec2-user/workspace/zen4-bit-2/node_modules/request/request.js:1091:12) at Object.onceWrapper (events.js:293:19) at emitNone (events.js:91:20) at IncomingMessage.emit (events.js:188:7) at endReadableNT (_stream_readable.js:975:12) at _combinedTickCallback (internal/process/next_tick.js:80:11) at process._tickCallback (internal/process/next_tick.js:104:9)

nao0811ta avatar Jun 10 '17 14:06 nao0811ta

What version of nodejs are you running? We advise at least 6.x

DeviaVir avatar Jun 10 '17 16:06 DeviaVir

v7.10.0

nao0811ta avatar Jun 10 '17 16:06 nao0811ta

@nedievas any chance you can take a look into this?

DeviaVir avatar Jun 11 '17 09:06 DeviaVir

maybe It think that have to fix to if (err && err.match && err.match(/Error: Invalid order: not enough exchange balance$/)) { or if (err && String(err).match(/Error: Invalid order: not enough exchange balance$/)) {

nao0811ta avatar Jun 11 '17 13:06 nao0811ta

Hi, I will. I was at the coast this weekend and see that my bot exited on this error.

nedievas avatar Jun 11 '17 15:06 nedievas

WTF. I had working bitfinex extension, and now it's dead... Will revise and update.

nedievas avatar Jun 12 '17 17:06 nedievas