{"comment":{"url":"https://api.github.com/repos/krishnasrinivas/minio-js/comments/12577670","html_url":"https://github.com/krishnasrinivas/minio-js/commit/3d9ef75dec521af35eace851e2878ecbde4fa6f5#commitcomment-12577670","id":12577670,"user":{"login":"harshavardhana","id":622699,"avatar_url":"https://avatars.githubusercontent.com/u/622699?v=3","gravatar_id":"","url":"https://api.github.com/users/harshavardhana","html_url":"https://github.com/harshavardhana","followers_url":"https://api.github.com/users/harshavardhana/followers","following_url":"https://api.github.com/users/harshavardhana/following{/other_user}","gists_url":"https://api.github.com/users/harshavardhana/gists{/gist_id}","starred_url":"https://api.github.com/users/harshavardhana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harshavardhana/subscriptions","organizations_url":"https://api.github.com/users/harshavardhana/orgs","repos_url":"https://api.github.com/users/harshavardhana/repos","events_url":"https://api.github.com/users/harshavardhana/events{/privacy}","received_events_url":"https://api.github.com/users/harshavardhana/received_events","type":"User","site_admin":false},"position":15,"line":525,"path":"src/main/minio.js","commit_id":"3d9ef75dec521af35eace851e2878ecbde4fa6f5","created_at":"2015-08-06T23:15:02Z","updated_at":"2015-08-06T23:15:02Z","body":"Adding to that it should also have a \"cb\" parameter so that one can reply error back. \r\n\r\n~~~\r\n if (!helpers.validBucketName(bucket)) {\r\n      return cb('invalid bucket name')\r\n    }\r\n\r\n    if (key === null || key.trim() === '') {\r\n      return cb('object key cannot be empty')\r\n    }\r\n~~~"}}