Error code: 40032 - Invalid publish request (impermissible extras field)

If you see this error, it means that the message you are trying to publish contains some arbitrary field(s) in the extras payload that is not allowed by the Ably service.

The extras payload in the message is reserved for specific objects related to the Ably service.  If you wish to add additional data in the extras payload you can do so by using the headers field.  Please note that headers must be a flat object, map<string, string> or equivalent - no further nesting is allowed.  We also recommend that if using unenveloped reactor rules, header names should be ASCII, as the headers will ultimately be turned into http/amqp/etc. headers.

Here is an example of what is allowed in the extras field:

extras: {
headers: {
header1: 'value1',
header2: 'value2'

If you have further questions, please feel free to reach out to us and we'll be happy to help you out.