Error code: 40013 - Invalid Message Data or Encoding

This error is raised by the client library when trying to encode the message payload and it is unable to handle that particular datatype. This is most likely to occur if you try to publish something that isn't serialisable by our SDKs.

Please check if you are able to marshall the payload as JSON or MsgPack .

If you have any further questions then please contact support by emailing support@ably.com