Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webhook Error converting value "rejected" to type 'MessageBird.Objects.Conversations.ConversationMessageStatus #92

Open
ZEDTransforms opened this issue Jan 8, 2021 · 0 comments

Comments

@ZEDTransforms
Copy link

Using newtonsoft to deserialize a webhook in response to sending a whatsapp message we get the error

Newtonsoft.Json.JsonSerializationException: Error converting value "rejected" to type 'MessageBird.Objects.Conversations.ConversationMessageStatus'. Path 'message.status', line 64, position 24.
---> System.ArgumentException: Requested value 'rejected' was not found.

{
"contact": {
"attributes": {},
"createdDatetime": "2021-01-08T11:06:38Z",
"customDetails": {},
"firstName": "",
"lastName": "",
"updatedDatetime": "2021-01-08T11:06:38Z"
},
"conversation": {
"contactId": "cc7c35b3bbc841438ba5880f3743b06d",
"createdDatetime": "2021-01-08T11:06:38Z",
"id": "f8fece0fc39f46a7a8f9a44ec5b54b9e",
"lastReceivedDatetime": "2021-01-08T11:06:39.17314366Z",
"lastUsedChannelId": "97162e4022fd41dda3cbb4f86a083dc3",
"lastUsedPlatformId": "whatsapp",
"status": "active",
"updatedDatetime": "2021-01-08T11:06:39.189118227Z"
},
"message": {
"content": {
"hsm": {
"language": {
"code": "en",
"policy": "deterministic"
},
"params": [
{
"default": "2 Garden"
},
{
"default": "Saturday, 09/01"
}
],
"templateName": "sendpincode"
}
},
"createdDatetime": "2021-01-08T11:06:39Z",
"direction": "sent",
"error": {
"code": 302,
"description": "The contact is not registered on WhatsApp."
},
"origin": "api",
"platform": "whatsapp",
"status": "rejected",
"type": "hsm",
"updatedDatetime": "2021-01-08T11:06:39Z"
},
"type": "message.updated"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant