# 40016: Invalid message name Identifier: `invalid_message_name` A message supplied a name that was invalid, so the message was rejected. ## What you should do Set the message [`name`](https://ably.com/docs/channels/messages.md#message-properties) to a string, or leave it unset. Correct the value and republish. ## Why it happens The `name` supplied on a message was not a string. The name is an optional label for the event, and when present it must be a string. ## What you'll see The error is reported with code 40016 and HTTP status 400. The message is `Invalid message name`.