@riocrypto/common 1.0.479 → 1.0.481
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/build/errors/insufficient-liquidity-error.d.ts +8 -0
- package/build/errors/insufficient-liquidity-error.js +19 -0
- package/build/errors/partner-not-found-error.d.ts +8 -0
- package/build/errors/partner-not-found-error.js +15 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InsufficientLiquidityError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class InsufficientLiquidityError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Insufficient liquidity to process order");
|
|
8
|
+
this.statusCode = 400;
|
|
9
|
+
Object.setPrototypeOf(this, InsufficientLiquidityError.prototype);
|
|
10
|
+
}
|
|
11
|
+
serializeErrors() {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
message: "Insufficient liquidity to process order, please try again later",
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.InsufficientLiquidityError = InsufficientLiquidityError;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartnerNotFoundError = void 0;
|
|
4
|
+
const custom_error_1 = require("./custom-error");
|
|
5
|
+
class PartnerNotFoundError extends custom_error_1.CustomError {
|
|
6
|
+
constructor() {
|
|
7
|
+
super("Partner not found");
|
|
8
|
+
this.statusCode = 404;
|
|
9
|
+
Object.setPrototypeOf(this, PartnerNotFoundError.prototype);
|
|
10
|
+
}
|
|
11
|
+
serializeErrors() {
|
|
12
|
+
return [{ message: "Partner not found" }];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.PartnerNotFoundError = PartnerNotFoundError;
|
package/build/index.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export * from "./errors/rio-settings-not-found-error";
|
|
|
26
26
|
export * from "./errors/address-check-failed-error";
|
|
27
27
|
export * from "./errors/partner-already-exists-error";
|
|
28
28
|
export * from "./errors/invalid-order-size-error";
|
|
29
|
+
export * from "./errors/partner-not-found-error";
|
|
30
|
+
export * from "./errors/insufficient-liquidity-error";
|
|
29
31
|
export * from "./middlewares/error-handler";
|
|
30
32
|
export * from "./middlewares/validate-request";
|
|
31
33
|
export * from "./middlewares/current-auth";
|
package/build/index.js
CHANGED
|
@@ -42,6 +42,8 @@ __exportStar(require("./errors/rio-settings-not-found-error"), exports);
|
|
|
42
42
|
__exportStar(require("./errors/address-check-failed-error"), exports);
|
|
43
43
|
__exportStar(require("./errors/partner-already-exists-error"), exports);
|
|
44
44
|
__exportStar(require("./errors/invalid-order-size-error"), exports);
|
|
45
|
+
__exportStar(require("./errors/partner-not-found-error"), exports);
|
|
46
|
+
__exportStar(require("./errors/insufficient-liquidity-error"), exports);
|
|
45
47
|
__exportStar(require("./middlewares/error-handler"), exports);
|
|
46
48
|
__exportStar(require("./middlewares/validate-request"), exports);
|
|
47
49
|
__exportStar(require("./middlewares/current-auth"), exports);
|