Package Exports
- arangodb-error-codes
- arangodb-error-codes/build/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (arangodb-error-codes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ArangoDB error codes
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)));