Error code: 40006 - Invalid Connection ID

Some examples of specific 40006 errors include:

Malformed message; invalid connectionKey

This error can occur in situations where the attempt to publish a message is unsuccessful due to the scenarios mentioned in publishing on behalf of a real-time connection e.g a publish on behalf where 

  • The connectionKey is invalid
  • the REST publisher is using a different Ably application to the realtime client
  • the clientId s don’t match between the realtime connection and the REST publish

Malformed message; invalid connectionId

This error can occur where the attempt to publish a message using a constructed message object contains a connectionId which does not correspond to the current connectionId of the real-time publisher.

 

If you have any questions about this, or any other part of Ably, please contact support@ably.com