@riocrypto/common 1.0.75 → 1.0.77
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.
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthorizationFailedError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class AuthorizationFailedError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Wyre authorization codes failed validation");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, AuthorizationFailedError.prototype);
|
|
10
|
+
}
|
|
11
|
+
serializeErrors() {
|
|
12
|
+
return [{ message: "Authorization failed" }];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.AuthorizationFailedError = AuthorizationFailedError;
|
|
@@ -5,7 +5,7 @@ const custom_error_1 = require("./custom-error");
|
|
|
5
5
|
class VerificationFailedError extends custom_error_1.CustomError {
|
|
6
6
|
constructor() {
|
|
7
7
|
super("SMS verification failed");
|
|
8
|
-
this.statusCode =
|
|
8
|
+
this.statusCode = 401;
|
|
9
9
|
Object.setPrototypeOf(this, VerificationFailedError.prototype);
|
|
10
10
|
}
|
|
11
11
|
serializeErrors() {
|
package/build/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./errors/verification-failed-error";
|
|
|
7
7
|
export * from "./errors/user-already-exists-error";
|
|
8
8
|
export * from "./errors/not-authorized-error";
|
|
9
9
|
export * from "./errors/wrong-processor-error";
|
|
10
|
+
export * from "./errors/authorization-failed-error";
|
|
10
11
|
export * from "./middlewares/error-handler";
|
|
11
12
|
export * from "./middlewares/validate-request";
|
|
12
13
|
export * from "./middlewares/current-auth";
|
package/build/index.js
CHANGED
|
@@ -23,6 +23,7 @@ __exportStar(require("./errors/verification-failed-error"), exports);
|
|
|
23
23
|
__exportStar(require("./errors/user-already-exists-error"), exports);
|
|
24
24
|
__exportStar(require("./errors/not-authorized-error"), exports);
|
|
25
25
|
__exportStar(require("./errors/wrong-processor-error"), exports);
|
|
26
|
+
__exportStar(require("./errors/authorization-failed-error"), exports);
|
|
26
27
|
__exportStar(require("./middlewares/error-handler"), exports);
|
|
27
28
|
__exportStar(require("./middlewares/validate-request"), exports);
|
|
28
29
|
__exportStar(require("./middlewares/current-auth"), exports);
|