PLhery / node-twitter-api-v2

Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js.
https://www.npmjs.com/package/twitter-api-v2
Apache License 2.0
1.32k stars 186 forks source link

Cannot use 'in' operator to search for 'code' in internal server error #426

Open kanefromls opened 1 year ago

kanefromls commented 1 year ago
TypeError: Cannot use 'in' operator to search for 'code' in internal server error
    at RequestHandlerHelper.createResponseError (/opt/discord/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:96:24)
    at RequestHandlerHelper.onResponseEndHandler (/opt/discord/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:252:25)
    at Gunzip.emit (node:events:513:28)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
uncaughtException

TypeError: Cannot use 'in' operator to search for 'code' in internal server error
    at RequestHandlerHelper.createResponseError (/opt/discord/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:96:24)
    at RequestHandlerHelper.onResponseEndHandler (/opt/discord/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js:252:25)
    at Gunzip.emit (node:events:513:28)
    at endReadableNT (node:internal/streams/readable:1358:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
uncaughtException

node 16.6.1

on version 1.12.10

I'm not sure how to reproduce and I'm not 100% on when it occurred but it may of been after I .destroy()'d streamer of type TweetStream<TweetV2SingleStreamResult>