twitter-direct-url
twitter-direct-url copied to clipboard
Code Error
node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#<Object>".] { code: 'ERR_UNHANDLED_REJECTION' }
Try this
twitterGetUrl(url) .then(data => { console.log(data); }) .catch(error => { console.error('Error:', error); });