ConversationInstance.messages() throws "Parameter 'sid' is not valid" when listing messages

Open
#1,222 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
50/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
nodejs, typescript
Domain
api

Research direction

The stack trace points at twilio/lib/rest/conversations/v1/conversation.js: the ConversationContextImpl constructor (line 33), the get _proxy getter (line 272) and ConversationInstance.messages (line 311). Start by comparing how the sid is passed into the context between 6.0.2 and 6.1.2, since the report says it regressed in 6.1.2. Done when conversations[0].messages().list() resolves without the 'sid' error and a test covers that call.

Written by the indexing model from the issue text.

Description

Description

Calling messages().list() on a conversation returned by conversations.list() throws an error indicating that some sid parameter is invalid.

Steps to reproduce

const conversations = await client.conversations.v1.conversations.list();
console.log(await conversations[0].messages().list());

The call throws the following error:

Error: Parameter 'sid' is not valid.
    at new ConversationContextImpl (twilio/lib/rest/conversations/v1/conversation.js:33:19)
    at get _proxy (twilio/lib/rest/conversations/v1/conversation.js:272:17)
    at ConversationInstance.messages (twilio/lib/rest/conversations/v1/conversation.js:311:21)
    at run (twilio.js:7:41)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

Affected versions

  • Fails in 6.1.2
  • Works in 6.0.2
Dominant language
TypeScript
Stars
1.5k
Forks
568
Avg merge
12h 52m
Merged PRs (30d)
7

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from twilio/twilio-node

All issues in twilio/twilio-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.