@neoxr/wb 2.3.7 → 2.3.8
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/package.json +1 -1
- package/system/functions.js +14 -0
package/package.json
CHANGED
package/system/functions.js
CHANGED
|
@@ -376,6 +376,20 @@ module.exports = class Function {
|
|
|
376
376
|
...options
|
|
377
377
|
}
|
|
378
378
|
})
|
|
379
|
+
mg.on('error', (err) => {
|
|
380
|
+
if (err.statusCode > 400) {
|
|
381
|
+
resolve({
|
|
382
|
+
status: false,
|
|
383
|
+
msg: `[${err.statusCode}] : Error while gwtting file`
|
|
384
|
+
})
|
|
385
|
+
} else {
|
|
386
|
+
resolve({
|
|
387
|
+
status: false,
|
|
388
|
+
msg: `[${err.message}] : Error while gwtting file`
|
|
389
|
+
})
|
|
390
|
+
}
|
|
391
|
+
mg.destroy()
|
|
392
|
+
})
|
|
379
393
|
mg.on('response', (response) => {
|
|
380
394
|
if (response.statusCode !== 200) {
|
|
381
395
|
resolve({
|