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,7 +379,14 @@ ...@@ -379,7 +379,14 @@
return null; return null;
}) })
.push(undefined, function (error) { .push(undefined, function (error) {
gadget.state.failedcount += 1; 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("Failed to get url: " + link);
showError(error); showError(error);
}); });
......
...@@ -242,7 +242,7 @@ ...@@ -242,7 +242,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>994.62669.7856.4232</string> </value> <value> <string>994.62696.17158.27613</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -260,7 +260,7 @@ ...@@ -260,7 +260,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1632319215.7</float> <float>1632420438.32</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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