luci: Fix error "XHR request timed out" into execAndRead

This commit is contained in:
remittor
2026-01-18 10:01:27 +03:00
parent bf418db17e
commit 2d32f04071

View File

@@ -674,7 +674,14 @@ return baseclass.extend({
return callback(cbarg, retCode, 'ERROR: Process failed with error ' + retCode); return callback(cbarg, retCode, 'ERROR: Process failed with error ' + retCode);
} }
} catch (e) { } catch (e) {
let skip_err = false;
if (e.message?.includes('RPC call to file/exec failed with error -32000: Object not found')) { if (e.message?.includes('RPC call to file/exec failed with error -32000: Object not found')) {
skip_err = true;
}
if (e.message?.includes('XHR request timed out')) {
skip_err = true;
}
if (skip_err) {
console.warn('WARN: execAndRead: ' + e.message); console.warn('WARN: execAndRead: ' + e.message);
return; // goto next timer iteration return; // goto next timer iteration
} }