@agility/management-sdk 0.1.38 → 0.1.39
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/.github/workflows/npm-publish.yml +61 -0
- package/README.md +396 -396
- package/dist/models/exception.d.ts +4 -0
- package/dist/models/exception.js +17 -1
- package/docs/asset-methods.md +381 -381
- package/docs/auth-component.md +360 -360
- package/docs/auth.md +593 -593
- package/docs/batch-methods.md +243 -243
- package/docs/cicd.md +606 -606
- package/docs/container-methods.md +267 -267
- package/docs/content-methods.md +491 -491
- package/docs/instance-methods.md +185 -185
- package/docs/instance-user-methods.md +230 -230
- package/docs/model-methods.md +433 -433
- package/docs/multi-instance-operations.md +191 -191
- package/docs/page-methods.md +737 -737
- package/docs/server-user-methods.md +279 -279
- package/docs/webhook-methods.md +451 -451
- package/license.txt +20 -20
- package/package.json +42 -41
- package/tsconfig.json +14 -14
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare class Exception extends Error {
|
|
2
2
|
constructor(message: string, inner?: Error);
|
|
3
3
|
innerError?: Error;
|
|
4
|
+
/** HTTP status code from the underlying response, when available. */
|
|
5
|
+
statusCode?: number;
|
|
6
|
+
/** Raw response body from the underlying response, when available. */
|
|
7
|
+
responseData?: unknown;
|
|
4
8
|
}
|
package/dist/models/exception.js
CHANGED
|
@@ -19,8 +19,24 @@ exports.Exception = void 0;
|
|
|
19
19
|
var Exception = /** @class */ (function (_super) {
|
|
20
20
|
__extends(Exception, _super);
|
|
21
21
|
function Exception(message, inner) {
|
|
22
|
-
var _this =
|
|
22
|
+
var _this = this;
|
|
23
|
+
var _a, _b, _c, _d;
|
|
24
|
+
var anyErr = inner;
|
|
25
|
+
var status = (_a = anyErr === null || anyErr === void 0 ? void 0 : anyErr.response) === null || _a === void 0 ? void 0 : _a.status;
|
|
26
|
+
var data = (_b = anyErr === null || anyErr === void 0 ? void 0 : anyErr.response) === null || _b === void 0 ? void 0 : _b.data;
|
|
27
|
+
var detail = data
|
|
28
|
+
? (typeof data === "string"
|
|
29
|
+
? data
|
|
30
|
+
: ((_d = (_c = data.exceptionMessage) !== null && _c !== void 0 ? _c : data.message) !== null && _d !== void 0 ? _d : JSON.stringify(data)))
|
|
31
|
+
: anyErr === null || anyErr === void 0 ? void 0 : anyErr.message;
|
|
32
|
+
// Surface the server's status + response body in the message. The Management API
|
|
33
|
+
// (and other callers) only read Error.message, so folding the response detail in here
|
|
34
|
+
// turns an opaque "Unable to save the container" into
|
|
35
|
+
// "Unable to save the container (HTTP 500): <server message>".
|
|
36
|
+
_this = _super.call(this, detail ? "".concat(message).concat(status ? " (HTTP ".concat(status, ")") : "", ": ").concat(detail) : message) || this;
|
|
23
37
|
_this.innerError = inner;
|
|
38
|
+
_this.statusCode = status;
|
|
39
|
+
_this.responseData = data;
|
|
24
40
|
return _this;
|
|
25
41
|
}
|
|
26
42
|
return Exception;
|