magmastream 2.10.1-dev.2 → 2.10.2-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.
package/dist/structures/Rest.js
CHANGED
|
@@ -106,16 +106,15 @@ class Rest {
|
|
|
106
106
|
timeout: this.node.options.apiRequestTimeoutMs,
|
|
107
107
|
validateStatus: () => true,
|
|
108
108
|
};
|
|
109
|
-
let response;
|
|
109
|
+
let response = null;
|
|
110
110
|
try {
|
|
111
111
|
response = await (0, axios_1.default)(config);
|
|
112
112
|
}
|
|
113
|
-
catch (
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
});
|
|
113
|
+
catch (e) {
|
|
114
|
+
const isTimeout = axios_1.default.isAxiosError(e) && e.code === "ECONNABORTED";
|
|
115
|
+
const message = e instanceof Error ? e.message : "Unknown error";
|
|
116
|
+
this.manager.emit(Enums_1.ManagerEventTypes.NodeError, this.node, new Error(`${isTimeout ? "Timeout" : "Network error"} on ${method} ${endpoint}: ${message}`));
|
|
117
|
+
return null;
|
|
119
118
|
}
|
|
120
119
|
const { status, data } = response;
|
|
121
120
|
if (status >= 200 && status < 300) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magmastream",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2-alpha.0",
|
|
4
4
|
"description": "A user-friendly Lavalink client designed for NodeJS.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"lint": "eslint \"src/**/*.{ts,js}\"",
|
|
17
17
|
"lint:fix": "eslint --fix \"src/**/*.{ts,js}\"",
|
|
18
18
|
"ci": "run-s format:check lint build types",
|
|
19
|
-
"release:
|
|
19
|
+
"release:alpha": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=alpha && npm publish --tag alpha && git push && git push --tags",
|
|
20
|
+
"release:dev": "npm run format && npm run lint:fix && npm run ci && npm version prerelease --preid=dev && npm publish --tag dev && git push && git push --tags"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
23
|
"@favware/rollup-type-bundler": "^4.0.0",
|