@sonoransoftware/sonoran.js 1.0.12 → 1.0.13
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.
|
@@ -107,13 +107,12 @@ class SequentialHandler {
|
|
|
107
107
|
finally {
|
|
108
108
|
clearTimeout(timeout);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
111
|
+
void this.manager.debug(`[${url} Response] - ${JSON.stringify({ body: parsedRes, res, status: res.status, headers: res.headers })}`);
|
|
111
112
|
if (res.ok) {
|
|
112
|
-
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
113
113
|
return parsedRes;
|
|
114
114
|
}
|
|
115
115
|
else if (res.status === 400 || res.status === 401 || res.status === 404) {
|
|
116
|
-
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
117
116
|
throw new errors_1.APIError(parsedRes, data.type, data.fullUrl, res.status, data);
|
|
118
117
|
}
|
|
119
118
|
else if (res.status === 429) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sonoransoftware/sonoran.js",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"description": "Sonoran.js is a library that allows you to interact with the Sonoran CAD and Sonoran CMS API. Based off of and utilizes several Discord.js library techniques for ease of use.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -127,13 +127,13 @@ export class SequentialHandler implements IHandler {
|
|
|
127
127
|
clearTimeout(timeout);
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
131
|
+
|
|
132
|
+
void this.manager.debug(`[${url} Response] - ${JSON.stringify({ body: parsedRes, res, status: res.status, headers: res.headers })}`);
|
|
131
133
|
|
|
132
134
|
if (res.ok) {
|
|
133
|
-
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
134
135
|
return parsedRes;
|
|
135
136
|
} else if (res.status === 400 || res.status === 401 || res.status === 404) {
|
|
136
|
-
const parsedRes = await SequentialHandler.parseResponse(res);
|
|
137
137
|
throw new APIError(parsedRes as string, data.type, data.fullUrl, res.status, data);
|
|
138
138
|
} else if (res.status === 429) {
|
|
139
139
|
const timeout = setTimeout(() => {
|