Skip to content

Latest commit

 

History

History
21 lines (13 loc) · 883 Bytes

README.md

File metadata and controls

21 lines (13 loc) · 883 Bytes

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)));