Skip to contentSkip to navigationSkip to topbar
On this page

Conflicting conversation modification



ERROR: 50391

error-50391 page anchor
PROGRAMMABLE CHAT
ERROR

The requested conversation is already being added or removed from this service instance concurrently with another API request. The last request will be rejected to avoid inconsistent state.

Possible Causes

possible-causes page anchor
  • You might be adding a new conversation to the service instance while the conversation with the same unique name is being removed from another thread.
  • You might be submitting multiple concurrent requests to add a conversation with the same unique name to the service instance.
  • You might be submitting multiple concurrent requests to delete the same conversation by SID or unique name from the service instance.
  • Implement an operation retrier and repeat the failed conversation API requests after an interval of time, using an exponential backoff algorithm.
  • Review your application logic that caused the race condition when adding or removing users. Perhaps the conflicting operations are happening in a loop that could be avoided.
  • Serialize your API requests that add or remove conversations. Wait until the original request completes and returns an API response, before sending any successive conversation requests.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.