mock-aws-s3
mock-aws-s3 copied to clipboard
getObject does not return Error objects for NoSuchKey
When an object doesn't exist, getObject
returns an object with the requisite properties, but it's not an Error object. This makes debugging more difficult (since there's no stack
property), breaks Nodejs conventions (callers typically expect the first argument to a callback to be an Error object), and deviates from the official AWS SDK (which returns Error objects).
https://github.com/MathieuLoutre/mock-aws-s3/blob/6b5aa02d2f4c902db14a1cfd2e03ce0a10204594/lib/mock.js#L331-L340
Every other method seems to correctly return Error objects. So this appears to be an outlier.