Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

50509: Programmable Chat: Media message body cannot be updated


ERROR: 50509

error-50509 page anchor
CHAT
ERROR

This error occurs when you try to update the Body of a media message in Programmable Chat. Media messages store the attachment separately from the message record, do not support a per-message text body, and use a service-defined placeholder body for legacy clients.

Possible causes

possible-causes page anchor
  • You sent an update request with the Body parameter for a message whose type is media.
  • The message was created with an attached media object, such as a MediaSid, and your application later tried to edit it like a text-only message.
  • Your application uses the same update logic for both text messages and media messages without checking the message type first.
  • Do not update Body on media messages. Update only supported non-body fields, such as Attributes, when you need to change message metadata.
  • Check the message type before updating it. Only send Body updates for text messages.
  • If you need to include text with an attachment, send a separate text message in the channel instead of trying to edit the media message body.
  • If the media message was created incorrectly, delete the message and create a new one with the correct attachment.
  • When sending media over the REST API, upload the file first and create the message with MediaSid instead of creating a media message and then attempting to rewrite its body.

Additional resources

additional-resources page anchor