Commit 7e9e4c75 authored by Alain Takoudjou's avatar Alain Takoudjou

erp5_web_mynij_search: Don't stop build if error code is 40X

If get a webpage during build return 401, 403, 404, etc ... we just skip the page and continue
parent 81c0a67f
......@@ -379,6 +379,13 @@
return null;
})
.push(undefined, function (error) {
var status;
if (error.target && error.target.status &&
error.target.status !== '0') {
status = parseInt(error.target.status || '0');
if ((status - 400) > 99)
gadget.state.failedcount += 1;
} else
gadget.state.failedcount += 1;
showError("Failed to get url: " + link);
showError(error);
......
......@@ -242,7 +242,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>994.62669.7856.4232</string> </value>
<value> <string>994.62696.17158.27613</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -260,7 +260,7 @@
</tuple>
<state>
<tuple>
<float>1632319215.7</float>
<float>1632420438.32</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment