TypeError: Cannot use 'in' operator to search for 'error' in <!DOCTYPE html>
<html lang="en" class="icecream">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=...
File "/app/node_modules/twitter-api-v2/dist/types/errors.types.js", line 78, col 37, in new ApiResponseError
if (options.data && 'error' in options.data && !options.data.errors) {
File "/app/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js", line 103, col 16, in RequestHandlerHelper.createResponseError
return new types_1.ApiResponseError(errorString, {
File "/app/node_modules/twitter-api-v2/dist/client-mixins/request-handler.helper.js", line 252, col 25, in RequestHandlerHelper.onResponseEndHandler
reject(this.createResponseError({ data, res: this.res, rateLimit, code }));
File "node:events", line 513, col 28, in Gunzip.emit
File "node:domain", line 489, col 12, in Gunzip.emit
File "node:internal/streams/readable", line 1358, col 12, in endReadableNT
File "node:internal/process/task_queues", line 83, col 21, in processTicksAndRejections
To Reproduce
Not sure if this is because of a V1 endpoint though 🤔 The last request logged in Sentry was
Describe the bug
To Reproduce
Not sure if this is because of a V1 endpoint though 🤔 The last request logged in Sentry was
But it might be a previous request that failed, because it's all asynchronous.
But regardless the code should probably assume that
options.data
can be a string? 🤨