twilio / twilio-ruby

A Ruby gem for communicating with the Twilio API and generating TwiML
MIT License
1.35k stars 463 forks source link

Sync not working since version 7.1.0 #722

Open taka0125 opened 1 month ago

taka0125 commented 1 month ago

Issue Summary

Since version 7.1.0, sync functionality has stopped working. The service_sid and map_sid are no longer passed in the sync_maps section, causing the following code to fail:

Steps to Reproduce

  1. Initialize the Twilio client with ACCOUNT_SID and AUTH_TOKEN.
  2. Retrieve the sync service using service_sid.
  3. Attempt to create a sync map item with key, data, and ttl.

Code Snippet

client = Twilio::REST::Client.new(ACCOUNT_SID, AUTH_TOKEN)
sync_service = client.sync.v1.services(service_sid)

sync_service
  .sync_maps(collection_name)
  .sync_map_items
  .create(
    key: key,
    data: data,
    ttl: ttl
  )

Exception/Log

`add': [HTTP 404] 20404 : Unable to create record (Twilio::REST::RestError)
The requested resource /Services//Maps//Items was not found
https://www.twilio.com/docs/errors/20404

Technical details:

AxelTheGerman commented 2 weeks ago

Noticed the same in 7.1.0 and 7.2.0. Downgrade to 7.0.2 "fixes" the issue.

As far as I can tell the code is all auto generated by OpenAPI so the bug is probably in the corresponding API docs?

taka0125 commented 2 weeks ago

Thank you. I'll reach out to Twilio Support and see what they say.