aws-lib
aws-lib copied to clipboard
Report errors back
ses.call('SendEmail', send_args, function(err, result) { console.log(result); });
Consider above code, when SendEmail request is sent to aws, aws either responds with error or success. But aws-lib does not report error as err, it just returns result back.
Right now everyone i thik parse the result to figure out what happened. But correct way to find result type is using http response code.
We need to use http error code, if code is >= 400 or <600, it should return it as err.
Link to api for easy access http://docs.amazonwebservices.com/ses/latest/APIReference/API_SendRawEmail.html
I agree - the HTTP status code should be used to determine error status. The issue is here.
With SES, the error is returned in the result as Error
instead of Errors
.
See #73.