@agility/management-sdk 0.1.24 → 0.1.26

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.
@@ -85,19 +85,23 @@ var ContainerMethods = /** @class */ (function () {
85
85
  });
86
86
  };
87
87
  ContainerMethods.prototype.getContainerByReferenceName = function (referenceName, guid) {
88
+ var _a;
88
89
  return __awaiter(this, void 0, void 0, function () {
89
90
  var apiPath, resp, err_3;
90
- return __generator(this, function (_a) {
91
- switch (_a.label) {
91
+ return __generator(this, function (_b) {
92
+ switch (_b.label) {
92
93
  case 0:
93
- _a.trys.push([0, 2, , 3]);
94
+ _b.trys.push([0, 2, , 3]);
94
95
  apiPath = "container/" + referenceName;
95
96
  return [4 /*yield*/, this._clientInstance.executeGet(apiPath, guid, this._options.token)];
96
97
  case 1:
97
- resp = _a.sent();
98
+ resp = _b.sent();
98
99
  return [2 /*return*/, resp.data];
99
100
  case 2:
100
- err_3 = _a.sent();
101
+ err_3 = _b.sent();
102
+ if (((_a = err_3.response) === null || _a === void 0 ? void 0 : _a.status) === 404) {
103
+ return [2 /*return*/, null]; // If the container is not found, return null
104
+ }
101
105
  throw new exception_1.Exception("Unable to retrieve the container for referenceName: " + referenceName, err_3);
102
106
  case 3: return [2 /*return*/];
103
107
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agility/management-sdk",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "Agility CMS Tyescript SDK for Management API.",
5
5
  "repository": {
6
6
  "type": "git",