podverse-external-services 5.1.19-alpha.0 → 5.1.20-alpha.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.
|
@@ -29,7 +29,7 @@ class PodcastIndexService {
|
|
|
29
29
|
constructor({ userAgent, authKey, baseUrl, secretKey, loggerService }) {
|
|
30
30
|
// Request handler
|
|
31
31
|
this.podcastIndexAPIRequest = (url, config) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
var _a, _b
|
|
32
|
+
var _a, _b;
|
|
33
33
|
const apiHeaderTime = Math.floor(Date.now() / 1000);
|
|
34
34
|
const hash = (0, sha1_1.default)(this.authKey + this.secretKey + apiHeaderTime).toString(enc_hex_1.default);
|
|
35
35
|
try {
|
|
@@ -42,14 +42,14 @@ class PodcastIndexService {
|
|
|
42
42
|
return response === null || response === void 0 ? void 0 : response.data;
|
|
43
43
|
}
|
|
44
44
|
catch (error) {
|
|
45
|
-
|
|
45
|
+
const errorDetails = {
|
|
46
46
|
url,
|
|
47
47
|
errorMessage: error === null || error === void 0 ? void 0 : error.message,
|
|
48
48
|
errorStack: error === null || error === void 0 ? void 0 : error.stack,
|
|
49
49
|
errorResponse: (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.data,
|
|
50
|
-
errorStatus: (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status
|
|
51
|
-
|
|
52
|
-
});
|
|
50
|
+
errorStatus: (_b = error === null || error === void 0 ? void 0 : error.response) === null || _b === void 0 ? void 0 : _b.status
|
|
51
|
+
};
|
|
52
|
+
this.loggerService.logError(`[PodcastIndex] Request failed: ${JSON.stringify(errorDetails, null, 2)}`);
|
|
53
53
|
throw error;
|
|
54
54
|
}
|
|
55
55
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "podverse-external-services",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.20-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"eslint": "^9.35.0",
|
|
36
36
|
"nodemon": "^3.1.10",
|
|
37
37
|
"typescript": "^5.9.2",
|
|
38
|
-
"podverse-helpers": "5.1.
|
|
38
|
+
"podverse-helpers": "5.1.20-alpha.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"podverse-helpers": "5.1.
|
|
41
|
+
"podverse-helpers": "5.1.20-alpha.0"
|
|
42
42
|
}
|
|
43
43
|
}
|