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
What version of the module is the issue happening on? Does the issue happen on latest version?
0.22.0
What platform and Node.js version? (For example Node.js 6.9.1 on Mac OS X)
node js 12 netlify functions
Does the action work when you manually perform request against mailgun using curl (or other means)?
Thats the thing, let me explain in the description
Sample source code or steps to reproduce
use mailgun.messages().send() with a delivery time further than 3 days ahead of time
response code/response from mailgun will be (as told by their support) Specific delivery time must not be farther than 3 days from now
response code from this library (the send function error callback): {"statusCode":400}
(Write description of your issue here, stack traces from errors and code that reproduces the issue are helpful)
So the issue is that some of mailguns helpful response error message gets lost through this library.
I read the package is no longer maintained, so this is just a note for myself and maybe others who find it useful
The text was updated successfully, but these errors were encountered:
I saw your posting while I was going to write about a similar issue and with your posting I solved it.
I think the documentation or callback naming is misleading.
The error contains the status code (as you said) but the body still exists.
So I use something like:
I had the problem in a different direction, I checked first for if(body) and found it strange that I get an error from mailgun but no error.
Yeah because body exists always (and contains the propper API feedback) and error only if there was an error. So if you want to use the error message you have to parse the body if the error object exists
0.22.0
node js 12 netlify functions
Thats the thing, let me explain in the description
Specific delivery time must not be farther than 3 days from now
{"statusCode":400}
(Write description of your issue here, stack traces from errors and code that reproduces the issue are helpful)
So the issue is that some of mailguns helpful response error message gets lost through this library.
I read the package is no longer maintained, so this is just a note for myself and maybe others who find it useful
The text was updated successfully, but these errors were encountered: