twitter-lite icon indicating copy to clipboard operation
twitter-lite copied to clipboard

Not able Get Response object of Get API Call inside Stream

Open ali-mansoor opened this issue 5 years ago • 0 comments

Inside Stream on data event I have called below function but it doesnt return response object it return Promise Pending

`var param = { source_id: "XXXX", target_id: "XXXXX", };

try { const response = await T.get("friendships/show", param); const data = response; } catch (e) { if ("errors" in e) { if (e.errors[0].code === 88) console.log( "Rate limit will reset on", new Date(e._headers.get("x-rate-limit-reset") * 1000) ); } } return data;`

ali-mansoor avatar Aug 23 '20 12:08 ali-mansoor