Open ali-mansoor opened 4 years ago
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;`
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;`