Description
When attempting to send a message to a WhatsApp newsletter channel via the /channel/sendMessage/{channelId} endpoint, the API returns a TypeError indicating that it cannot read the description property of an undefined object. This issue specifically occurs when targeting newsletter channels (identifiable by the @newsletter suffix in the chatId), while regular WhatsApp chats function as expected.
Expected Behavior
The API should successfully deliver messages to newsletter channels and return a success response with appropriate status.
Actual Behavior
The API returns an error response with status code 500 or 400, containing the following error message:
{
"success": false,
"error": "Cannot read properties of undefined (reading 'description')"
}
Description
When attempting to send a message to a WhatsApp newsletter channel via the
/channel/sendMessage/{channelId}endpoint, the API returns aTypeErrorindicating that it cannot read thedescriptionproperty of an undefined object. This issue specifically occurs when targeting newsletter channels (identifiable by the@newslettersuffix in the chatId), while regular WhatsApp chats function as expected.Expected Behavior
The API should successfully deliver messages to newsletter channels and return a success response with appropriate status.
Actual Behavior
The API returns an error response with status code
500or400, containing the following error message:{ "success": false, "error": "Cannot read properties of undefined (reading 'description')" }