We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dc2c3d commit d785208Copy full SHA for d785208
lib/http-request.js
@@ -61,9 +61,11 @@ HttpRequest.prototype.execute = function() {
61
this.client.emit('riak.request.start', this.event)
62
63
var request = httpClient.request(meta, function(err, response) {
64
+ var normalstatus = [200,204,300,304];
65
+ if(self.event.method == 'delete') normalstatus.push(404);
66
// Are we using a connection pool and do we have any errors ?
67
if (meta._pool && err) return callback(err);
- if (meta._pool && response.statusCode !== 200) {
68
+ if (meta._pool && normalstatus.indexOf(response.statusCode) == -1) {
69
var e = new Error();
70
e.message = 'Invalid StatusCode: '+ response;
71
e.statusCode = response.statusCode;
0 commit comments