-
Notifications
You must be signed in to change notification settings - Fork 546
Closed
Labels
status: waiting for feedbackwaiting for feedback from the submitterwaiting for feedback from the submittertype: bugbug in the librarybug in the library
Description
Issue Summary
Calling client.messages.create() using version 1.11.7 of dayjs throws an exception as shown below. Downgrading to version 1.11.5 resolves the issue.
Steps to Reproduce
- send a message using client.messages.create() as shown in the code snippet
Code Snippet
const twilio = require('twilio');
const client = twilio(ACCOUNT_SID, AUTH_TOKEN);
try {
const result = await client.messages.create({
to,
from,
body,
statusCallback,
});
return result;
} catch (e) {
console.log(e.message, e.stack);
}
Exception/Log
TypeError: Cannot read properties of null (reading 'constructor')
at M.r (/Users/node_modules/dayjs/plugin/objectSupport.js:1:412)
at M.parse (/Users//node_modules/dayjs/plugin/objectSupport.js:1:887)
at new M (/Users/node_modules/dayjs/dayjs.min.js:1:2038)
at Function.utc (/Users/node_modules/dayjs/plugin/utc.js:1:402)
at parseDate (/Users/node_modules/twilio/lib/base/deserialize.js:64:29)
at Object.rfc2822DateTime (/Users/node_modules/twilio/lib/base/deserialize.js:40:12)
at new MessageInstance (/Users/node_modules/twilio/lib/rest/api/v2010/account/message.js:126:37)
at /Users/node_modules/twilio/lib/rest/api/v2010/account/message.js:279:63
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Technical details:
- twilio-node version: 4.11.0
- dayjs version: 1.11.7
- node version: 18.15.0
Metadata
Metadata
Assignees
Labels
status: waiting for feedbackwaiting for feedback from the submitterwaiting for feedback from the submittertype: bugbug in the librarybug in the library