简体   繁体   中英

Datatable ajax error without error detail

The process falls into the error(jqXHR jqXHR, String textStatus, String errorThrown) handler.

When I console.log the variables I get :

jqXHR: {
    readyState: 0,
    responseText: "",
    status: 0,
    statusText: "error"
    //and other meaningless prototype functions
}
textStatus: "error"
errorThrown: ""

I have 2 Datatables on the same page, and the other one is loading properly.

Console shows a weird thing :

  • The first datatable ajax call is OK (HTTP 200)
  • The second one with the error has no HTTP code and the response is empty. But when I open the call in a new tab, it's working as expected, returning a JSON response.

The problem was linked to the Apache2 web server.

I don't know why, but restarting it solved the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM