twilio-node
twilio-node copied to clipboard
Alerts Ignores Time Specified
Issue Summary
When using the Alert endpoint on the Monitor Rest API, the code ignores the time specified and will return the whole days worth of results.
Steps to Reproduce
- Review alerts and pick a startDate and endDate including time, that will exclude some alerts from the day.
- Run query on alerts specifying startDate and endDate.
- You will see results outside of the time specified.
Code Snippet
This example shows trying to grab logs from the last minute.
const now = Date.now();
const startDate = new Date(now - 60 * 1000)
const endDate = new Date(now);
const client = new Twilio(accountSid, authToken);
const alerts = await client.monitor.alerts.list({
startDate,
endDate
});
Exception/Log
# paste exception/log here
Technical details:
- twilio-node version: 3.42.2
- node version: 12
Working on updating the upstream API definition so the fix doesn't get overwritten. And testing as this will impact the other 5 languages.
Approved and merged. The other languages will be updated as well on the next release cycle.