Skip to content

keys.js potential for uncaught exception #17

@rclark

Description

@rclark

Sometimes it appears that the aws-sdk can return no error object, and also provide a data object where .Contents is undefined. In that case we would throw an unhandled error in the callback when we try and .slice the anticipated array.

s3.listObjects(params, function(err, data) {
  assert.notOk(err, 'there is no error');
  assert.notOk(data.Contents, 'there is also no information');
});

cc @yhahn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions