New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

elasticsearch-exceptions

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

elasticsearch-exceptions

Parse Elasticsearch exception responses and transform them into JavaScript Errors

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
128
decreased by-60.74%
Maintainers
2
Weekly downloads
 
Created
Source

Elasticsearch-exceptions

NPM version Build Status Coverage Status

Parse Elasticsearch exception responses and transform them into JavaScript Errors

var EsEx = require('elasticsearch-exceptions');

someRequestToElasticSearchOrUsingANodeJSClient(function(err, ok){
    if(EsEx.isAliasesMissingException(err)){
        // do something else
    }

    if(err){
        // do something
    }

    // etc...
});

Supported exceptions (Elasticsearch v1.4.0)

[
  'AggregationExecutionException',
  'AggregationInitializationException',
  'AliasesMissingException',
  'AlreadyExpiredException',
  'BlobStoreException',
  'CircuitBreakingException',
  'ClusterBlockException',
  'DelayRecoveryException',
  'DiscoveryException',
  'ElasticsearchException.WithRestHeaders',
  'ElasticsearchGenerationException',
  'ElasticsearchIllegalArgumentException',
  'ElasticsearchIllegalStateException',
  'ElasticsearchNullPointerException',
  'ElasticsearchParseException',
  'ElasticsearchTimeoutException',
  'EsRejectedExecutionException',
  'ExpressionScriptCompilationException',
  'ExpressionScriptExecutionException',
  'FacetPhaseExecutionException',
  'FailedNodeException',
  'FailedToResolveConfigException',
  'GatewayException',
  'GroovyScriptCompilationException',
  'GroovyScriptExecutionException',
  'HttpException',
  'IgnoreRecoveryException',
  'IndexException',
  'IndexShardAlreadyExistsException',
  'IndexTemplateAlreadyExistsException',
  'IndexTemplateMissingException',
  'IndexMissingException',
  'IndexWarmerMissingException',
  'InvalidIndexTemplateException',
  'Lucene.EarlyTerminationException',
  'MapperException',
  'MasterNotDiscoveredException',
  'NodeClosedException',
  'NoNodeAvailableException',
  'PercolateException',
  'PrimaryMissingActionException',
  'ProcessClusterEventTimeoutException',
  'RecoveryFailedException',
  'RepositoryException',
  'RiverException',
  'RoutingException',
  'RoutingMissingException',
  'ScriptException',
  'SearchContextMissingException',
  'SearchException',
  'SearchPhaseExecutionException',
  'SearchSourceBuilderException',
  'SettingsException',
  'SnapshotException',
  'SuggestBuilderException',
  'TimestampParsingException',
  'TranslogCorruptedException',
  'TransportException',
  'UnavailableShardsException',
  'UncategorizedExecutionException'
]

Todo

  • transform elasticsearch client errors to elasticsearch-exceptions
  • parse exception body

FAQs

Package last updated on 22 Dec 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc