Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
303 stars 31 forks source link

Wrong error message if invalid tweet list is fetched #547

Closed Rishikant181 closed 1 day ago

Rishikant181 commented 1 month ago

For an invalid tweet list such as the one shown here, the error thrown is:

TypeError: Cannot read properties of undefined (reading 'value')
    at new CursoredData (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/models/data/CursoredData.ts:35:84)
    at Object.LIST_TWEETS (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/collections/Extractors.ts:40:3)
    at TweetService.<anonymous> (/Documents/github/tweet-watcher/node_modules/rettiwt-api/src/services/public/TweetService.ts:201:36)
    at step (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:59:23)
    at Object.next (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:40:53)
    at fulfilled (/Documents/github/tweet-watcher/node_modules/rettiwt-api/dist/services/public/TweetService.js:31:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

It should be returning something like undefined like all other methods do.