node-mandrill icon indicating copy to clipboard operation
node-mandrill copied to clipboard

Perhaps should return an error if status field in response is invalid or rejected?

Open cjroebuck opened this issue 13 years ago • 1 comments

If you try sending a mail to an invalid email address for example, mandrill will return the following response:

[{"email":"notavalidemailaddress", "status":"invalid"}] but with status code 200, so node-mandrill thinks its ok, but maybe should return an error in the callback?

cjroebuck avatar Oct 13 '12 01:10 cjroebuck

I'd agree with that. In theory, the REST API should return an error status code for that error, since it wasn't a successful request. Obviously this isn't the case, or there's a bug with the response parsing.

Either way, I'll look into what we can do to fix it.

jimrubenstein avatar Oct 13 '12 22:10 jimrubenstein