Unfortunately, no part of that is a human-readable description that we could directly map to our own Message property.
We could use the errno library to get human-readable descriptions of the errors, in cases where the errno key is found.
The current mismatch between strings and objects could cause a failure elsewhere in an application if it's expecting that "Message" will always be a string.
When we catch non-Amazon-Web-Services errors, we try to present them in the format that AWS does for consistency.
AWS returns a human-readable string in the Message field. But here, when we capture a "RequestError", we are currently returning an object:
https://github.com/aheckmann/node-ses/blob/master/lib/email.js#L61
Here's an example of object that was actually returned:
Unfortunately, no part of that is a human-readable description that we could directly map to our own
Message
property.We could use the errno library to get human-readable descriptions of the errors, in cases where the
errno
key is found.The current mismatch between strings and objects could cause a failure elsewhere in an application if it's expecting that "Message" will always be a string.