We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Most (all?) of the errors produced by the library itself have an integer status. For example,
status
client.getSource({ index: 'my_index', type: 'my_type', id: 'not_found' }) .catch(function(error) { console.log(error.status); });
outputs the integer 404.
404
When creating an error directly, however, it's a string. For example,
var errors = require('elasticsearch').errors; var notFound = new errors.NotFound(); console.log(notFound.status);
outputs the string '404'.
'404'
Not a big deal, but it is somewhat annoying when you're doing something like error.status === 404.
error.status === 404
The text was updated successfully, but these errors were encountered:
Good point
Sorry, something went wrong.
Closed by 0e3fe15
Will release soon
Thanks! 👍
spalger
No branches or pull requests
Most (all?) of the errors produced by the library itself have an integer
status
. For example,outputs the integer
404
.When creating an error directly, however, it's a string. For example,
outputs the string
'404'
.Not a big deal, but it is somewhat annoying when you're doing something like
error.status === 404
.The text was updated successfully, but these errors were encountered: