aws-lib icon indicating copy to clipboard operation
aws-lib copied to clipboard

Report errors back

Open manishtpatel opened this issue 12 years ago • 2 comments

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

manishtpatel avatar Apr 10 '12 17:04 manishtpatel

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.

ndabas avatar Aug 19 '12 18:08 ndabas

See #73.

willwhite avatar Feb 21 '13 18:02 willwhite