mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2026-01-27 12:50:35 +03:00
luci: Fix error "XHR request timed out" into execAndRead
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user