Commit 56d9eb14 authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] Improve AJAX error display

Show HTTP status code + description + url + response headers
parent 7add978b
...@@ -231,10 +231,12 @@ ...@@ -231,10 +231,12 @@
return;\n return;\n
}\n }\n
\n \n
if (error instanceof XMLHttpRequest) {\n if (error.target instanceof XMLHttpRequest) {\n
error_text = error.toString() + " " +\n error_text = error.target.toString() + " " +\n
error.status + " " +\n error.target.status + " " +\n
error.statusText;\n error.target.statusText + "\\n" +\n
error.target.responseURL + "\\n\\n" +\n
error.target.getAllResponseHeaders();\n
} else if (error instanceof Error) {\n } else if (error instanceof Error) {\n
error_text = error.toString();\n error_text = error.toString();\n
} else {\n } else {\n
...@@ -791,7 +793,7 @@ ...@@ -791,7 +793,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>947.3905.58968.48008</string> </value> <value> <string>948.17186.10699.61269</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -809,7 +811,7 @@ ...@@ -809,7 +811,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1447351473.68</float> <float>1452007398.41</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