Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stopped being lazy about my status check. Regex that puppy (still pre…

…tty lazy).

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
  • Loading branch information...
commit abfe0044c93bb869e8b8a24ab8b5b14385a315a8 1 parent 46dfb2a
@ncb000gt authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/elasticsearch.js
View
2  lib/elasticsearch.js
@@ -125,7 +125,7 @@ ElasticSearch.prototype._request = function(opts, data, cb) {
}
if (cb) {
//Success based status codes.
- if (!([200, 201, 202, 205, 206].indexOf(statusCode))) {
+ if (!((""+statusCode).match(/2\d\d/))) {
cb(res_json);
} else {
cb(null, res_json);
Please sign in to comment.
Something went wrong with that request. Please try again.