Skip to content
This repository has been archived by the owner on Aug 15, 2021. It is now read-only.

TypeError: Cannot read property 'status' of undefined #54

Closed
dinosaw opened this issue Oct 6, 2017 · 1 comment
Closed

TypeError: Cannot read property 'status' of undefined #54

dinosaw opened this issue Oct 6, 2017 · 1 comment
Labels

Comments

@dinosaw
Copy link

dinosaw commented Oct 6, 2017

Hello, thanks for this great tool. I had it successfully working just a week ago and was loving it! But without changing anything, it seems to not be working at this time. Do you know if there has been any changes that would be causing the following error:

[root@dino ~]# node --version
v7.6.0
[root@dino ~]#
[root@dino ~]# twitch-chatlog -p -l 60 -C CLIENTID VODID
TypeError: Cannot read property 'status' of undefined
    at searchChat (/root/.nvm/versions/node/v7.6.0/lib/node_modules/twitch-chatlog/lib/index.js:81:22)
    at process._tickCallback (internal/process/next_tick.js:103:7)
(node:17903) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'status' of undefined
(node:17903) 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.

Installed using the following command and got no errors:

npm install -g twitch-chatlog

I've made sure to use node >7.6, and I also tested with 7.10.1 as well.

Also for what it's worth, running --help produces the options/usage without any errors.

Any idea what the problem may be?

@freaktechnik
Copy link
Owner

Seems like an error in my error handling code (funny, I know). It assumes errors have a response property that has a status property, which made it throw this error. Code location: https://github.com/freaktechnik/twitch-chatlog/blob/master/lib/index.js#L80

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants