@tiledesk/tiledesk-tybot-connector 0.3.5-rc1 → 0.3.5-rc2
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
available on:
|
|
6
6
|
▶️ https://www.npmjs.com/package/@tiledesk/tiledesk-tybot-connector
|
|
7
7
|
|
|
8
|
+
# v0.3.5-rc2
|
|
9
|
+
- bug-fixed: cannot set status of undefined reading res.status in DirAssistant
|
|
10
|
+
|
|
8
11
|
# v0.3.5-rc1
|
|
9
12
|
- changed: refactoring web-request-v2
|
|
10
13
|
- bug-fixed: jsonBody parse error in web-request-v2
|
package/package.json
CHANGED
|
@@ -407,17 +407,17 @@ class DirAssistant {
|
|
|
407
407
|
if (this.log) {console.log("DirAssistant HTTPREQUEST", HTTPREQUEST);}
|
|
408
408
|
this.#myrequest(
|
|
409
409
|
HTTPREQUEST, async (err, res) => {
|
|
410
|
-
let status = res.status;
|
|
411
410
|
if (err) {
|
|
412
411
|
if (this.log) {console.error("DirAssistant error:", err);}
|
|
413
412
|
reject(err);
|
|
414
413
|
}
|
|
415
|
-
else if(res
|
|
414
|
+
else if(res?.status >= 200 && res?.status <= 299) {
|
|
416
415
|
if (this.log) {console.log("got response data:", res.data);}
|
|
417
416
|
// let return_body = res.data;
|
|
418
417
|
resolve(res.data);
|
|
419
418
|
}
|
|
420
419
|
else {
|
|
420
|
+
let status = res?.status;
|
|
421
421
|
reject(new Error("Message add status != 200:", status));
|
|
422
422
|
}
|
|
423
423
|
}
|
|
@@ -442,17 +442,17 @@ class DirAssistant {
|
|
|
442
442
|
if (this.log) {console.log("DirAssistant HTTPREQUEST", HTTPREQUEST);}
|
|
443
443
|
this.#myrequest(
|
|
444
444
|
HTTPREQUEST, async (err, res) => {
|
|
445
|
-
let status = res.status;
|
|
446
445
|
if (err) {
|
|
447
446
|
if (this.log) {console.error("DirAssistant error:", err);}
|
|
448
447
|
reject(err);
|
|
449
448
|
}
|
|
450
|
-
else if(res
|
|
449
|
+
else if(res?.status >= 200 && res?.status <= 299) {
|
|
451
450
|
if (this.log) {console.log("got response data:", res.data);}
|
|
452
451
|
// let return_body = res.data;
|
|
453
452
|
resolve(res.data);
|
|
454
453
|
}
|
|
455
454
|
else {
|
|
455
|
+
let status = res?.status;
|
|
456
456
|
reject(new Error("Message add status != 200:", status));
|
|
457
457
|
}
|
|
458
458
|
}
|
|
@@ -477,17 +477,17 @@ class DirAssistant {
|
|
|
477
477
|
if (this.log) {console.log("DirAssistant HTTPREQUEST", HTTPREQUEST);}
|
|
478
478
|
this.#myrequest(
|
|
479
479
|
HTTPREQUEST, async (err, res) => {
|
|
480
|
-
let status = res.status;
|
|
481
480
|
if (err) {
|
|
482
481
|
if (this.log) {console.error("DirAssistant error:", err);}
|
|
483
482
|
reject(err);
|
|
484
483
|
}
|
|
485
|
-
else if(res
|
|
484
|
+
else if(res?.status >= 200 && res?.status <= 299) {
|
|
486
485
|
if (this.log) {console.log("got response data:", res.data);}
|
|
487
486
|
// let return_body = res.data;
|
|
488
487
|
resolve(res.data);
|
|
489
488
|
}
|
|
490
489
|
else {
|
|
490
|
+
let status = res?.status;
|
|
491
491
|
reject(new Error("Message add status != 200:", status));
|
|
492
492
|
}
|
|
493
493
|
}
|