You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the API is growing at Facebook, it appears some new error codes are being returned.
We've been working with the API for the last weeks, and I'm almost sure that when someone deleted a conversation with a bot, Facebook would return 100 error in response to the Bot.deliver action, a Facebook::Messenger::Bot::RecipientNotFound.
Now, apparently it is returning a new error code, 200, per the API:
"This person isn't receiving messages from you right now."
I think that'd be awesome, @pjpires! I'd be very happy to merge a pull request with new and improved error handling (and I like the approach where each error has its own exception that you can rescue from).
As the API is growing at Facebook, it appears some new error codes are being returned.
We've been working with the API for the last weeks, and I'm almost sure that when someone deleted a conversation with a bot, Facebook would return 100 error in response to the
Bot.deliver
action, aFacebook::Messenger::Bot::RecipientNotFound
.Now, apparently it is returning a new error code, 200, per the API:
"This person isn't receiving messages from you right now."
I'm relying on these errors to keep track of the real bot users (I destroy those who don't receive messages), so it would be cool either to upgrade the gem with the recently added error responses (https://developers.facebook.com/docs/messenger-platform/send-api-reference#response) or wrap the errors in the exceptions in a way that the code was still available for us to check, e.g., see: https://github.com/ryanb/cancan/blob/master/lib/cancan/exceptions.rb#L35.
Any thoughts on this?
Thanks in advance.
The text was updated successfully, but these errors were encountered: