-
Notifications
You must be signed in to change notification settings - Fork 782
Closed
Labels
status: work in progressTwilio or the community is in the process of implementingTwilio or the community is in the process of implementingtype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap
Description
Issue Summary
If the payload is too large Sendgrid's API returns the following HTML
<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx</center>
</body>
</html>This messes up with a JSON.parse which raises a global exception
Steps to Reproduce
The least the method sendgrid.API should reject the promise instead of raising a global error.
I'd say that ideally the API would return a json with an error element and this would make the method reject the promise with the corresponding error
Technical details:
- sendgrid-nodejs Version: 4.x.x
- Node.js Version: 4.1.2
Metadata
Metadata
Assignees
Labels
status: work in progressTwilio or the community is in the process of implementingTwilio or the community is in the process of implementingtype: community enhancementfeature request not on Twilio's roadmapfeature request not on Twilio's roadmap