This will occur when the structure of the received object/token does not match the expected object/token. 

This usually occurs for users when they attempt to use one object, such as a RequestToken, and another object is expected instead, such as an Ably Token. In this case you need to ensure the MIME type of your object matches the actual object being sent.