node-red-contrib-hik-media-buffer 1.1.88 → 1.1.90
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/hik-media-buffer.js +12 -2
- package/package.json +1 -1
package/hik-media-buffer.js
CHANGED
|
@@ -150,12 +150,22 @@ module.exports = function(RED) {
|
|
|
150
150
|
|
|
151
151
|
let xmlResponse = await new Promise((resolve) => {
|
|
152
152
|
exec(curlCommand, (err, stdout, stderr) => {
|
|
153
|
-
if (err)
|
|
154
|
-
|
|
153
|
+
if (err) {
|
|
154
|
+
// STAMPIAMO IL VERO ERRORE DI LINUX/MIKROTIK
|
|
155
|
+
node.error(`[CRASH cURL]: ${err.message} | STDERR: ${stderr}`);
|
|
156
|
+
resolve(null);
|
|
157
|
+
} else {
|
|
158
|
+
resolve(stdout);
|
|
159
|
+
}
|
|
155
160
|
});
|
|
156
161
|
});
|
|
157
162
|
|
|
163
|
+
// >>> AGGIUNGI QUESTE RIGHE DI LOG QUI PER VEDERE COSA COZZO RISPONDE <<<
|
|
164
|
+
node.warn(`[DEBUG NVR RESP] Risposta grezza per traccia ${t.id}:`);
|
|
165
|
+
node.warn(xmlResponse);
|
|
166
|
+
|
|
158
167
|
if (!xmlResponse || xmlResponse.includes("400 Bad Request") || xmlResponse.includes("401 Unauthorized")) {
|
|
168
|
+
node.error(`[DEBUG NVR ERRORE] Risposta KO da curl su traccia ${t.id}`);
|
|
159
169
|
continue;
|
|
160
170
|
}
|
|
161
171
|
|