@basis-theory/basis-theory-reactor-formulas-sdk-js 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basis-theory/basis-theory-reactor-formulas-sdk-js",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Javascript SDK for building Basis Theory reactor formulas",
5
5
  "repository": "https://github.com/Basis-Theory/basistheory-reactor-formulas-sdk-js",
6
6
  "main": "src/index.js",
@@ -0,0 +1,14 @@
1
+ const BasisTheoryReactorError = require('./BasisTheoryReactorError');
2
+
3
+ class AuthorizationError extends BasisTheoryReactorError {
4
+ constructor(errors) {
5
+ super({
6
+ message: 'Forbidden',
7
+ status: 403,
8
+ errors,
9
+ });
10
+ this.name = 'AuthorizationError';
11
+ }
12
+ }
13
+
14
+ module.exports = AuthorizationError;
@@ -1,4 +1,5 @@
1
1
  const AuthenticationError = require('./AuthenticationError');
2
+ const AuthorizationError = require('./AuthorizationError');
2
3
  const BadRequestError = require('./BadRequestError');
3
4
  const InvalidPaymentMethodError = require('./InvalidPaymentMethodError');
4
5
  const InvalidReactorConfigurationError = require('./InvalidReactorConfigurationError');
@@ -7,6 +8,7 @@ const ReactorRuntimeError = require('./ReactorRuntimeError');
7
8
 
8
9
  module.exports = {
9
10
  AuthenticationError,
11
+ AuthorizationError,
10
12
  BadRequestError,
11
13
  InvalidPaymentMethodError,
12
14
  InvalidReactorConfigurationError,