/arangodb-error-codes

Error codes for ArangoDB

Primary LanguageJavaScript

ArangoDB error codes

MIT License Build Status

NPM status

ArangoDB 3 error codes according to the official documentation.

installation

npm install --save arangodb-error-codes

usage

const arangoErrorCodes = require('arangodb-error-codes');

db.collection(collectionName).firstExample({ id })
  .catch(error => (error.errorNum === arangoErrorCodes.ERROR_HTTP_NOT_FOUND ? Promise.resolve() : Promise.reject(error)));