diff --git a/src/main/minio.js b/src/main/minio.js index 70c9abc9..2dd7f83f 100644 --- a/src/main/minio.js +++ b/src/main/minio.js @@ -641,10 +641,10 @@ export class Client { // Retry with region returned as part of error this.makeRequest({method, bucketName, headers}, payload, [200], err.region, false, cb) } else { - cb && cb(err) + return cb && cb(err) } } - cb && cb(err) + return cb && cb(err) } this.makeRequest({method, bucketName, headers}, payload, [200], region, false, processWithRetry) }