fb-messenger-bot-api
fb-messenger-bot-api copied to clipboard
Don't reject bad requests
I send a quick replies as below
await client.sendQuickReplyMessage("id_here", "test", [
{
id: "1",
title: "test",
payload: "test"
}
]);
the response from facebook is 400 bad request as below
{
"error": {
"message": "(#100) Invalid keys \"id\" were found in param \"message[quick_replies][0]\".",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "GEWn2WN2fuL"
}
}
but the method resolves the response body instead of rejects it, so I can't catch the error message here
Hey @huydod , based on this line I can see that if the response has error property, it rejects it with message, it does not resolve it. Same with callback option on line 70.