Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evervault/sdk

Package Overview
Dependencies
Maintainers
7
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/sdk - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

19

lib/utils/errors.js

@@ -20,4 +20,19 @@ class EvervaultError extends Error {

const mapApiResponseToError = ({ statusCode, body }) => {
class ForbiddenIPError extends EvervaultError {}
class DecryptError extends EvervaultError {}
const mapApiResponseToError = ({ statusCode, body, headers }) => {
if (statusCode === 401) return new ApiKeyError('Invalid Api Key provided.');
if (
statusCode === 403 &&
headers['x-evervault-error-code'] === 'forbidden-ip-error'
) {
return new ForbiddenIPError(
body.message || "IP is not present on the invoked Cage's whitelist."
);
}
if (statusCode === 422) {
return new DecryptError(body.message || 'Unable to decrypt data.');
}
if (statusCode === 423)

@@ -45,2 +60,4 @@ return new AccountError(

CertError,
DecryptError,
ForbiddenIPError,
};

4

package.json
{
"name": "@evervault/sdk",
"version": "1.9.0",
"version": "1.9.1",
"description": "Node.js SDK for Evervault",

@@ -64,3 +64,3 @@ "main": "lib/index.js",

"lint-staged": {
"**/*": "prettier --write --ignore-unknown ."
"**/*.js": "prettier --write --ignore-unknown \"./**/*.js\""
},

@@ -67,0 +67,0 @@ "config": {

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