Comparing version 3.0.0-beta.3 to 3.0.0-beta.4
@@ -8,3 +8,3 @@ "use strict"; | ||
var _stytch_error = require("./stytch_error"); | ||
var _errors = require("./errors"); | ||
@@ -14,11 +14,12 @@ function request(client, config) { | ||
if (err.response) { | ||
throw new _stytch_error.StytchError(err.response.data); | ||
// Received a structured error from the API | ||
throw new _errors.StytchError(err.response.data); | ||
} else if (err.request) { | ||
// No response received for the request. | ||
throw new Error(err.request); | ||
throw new _errors.RequestError(err.message, err.config); | ||
} else { | ||
// The request couldn't be sent for some reason. | ||
throw new Error(err.message); | ||
throw new _errors.RequestError(err.message, config); | ||
} | ||
}); | ||
} |
{ | ||
"name": "stytch", | ||
"version": "3.0.0-beta.3", | ||
"version": "3.0.0-beta.4", | ||
"description": "A wrapper for the Stytch API", | ||
@@ -20,3 +20,3 @@ "types": "./types/lib/index.d.ts", | ||
"scripts": { | ||
"build": "babel lib --out-dir dist --extensions '.ts' && tsc --declaration --outDir types --emitDeclarationOnly", | ||
"build": "rm -rf dist types && babel lib --out-dir dist --extensions '.ts' && tsc --declaration --outDir types --emitDeclarationOnly", | ||
"lint": "eslint lib", | ||
@@ -23,0 +23,0 @@ "test": "jest", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29366
688