Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81920

Server Side Error shown

$
0
0

How can i show a server-side error that send with json to the datatables. The error looks like this format:

{
    "type": "error",
    "icon": "fa fa-exclamation-triangle",
    "title": "404, Not Found",
    "text": "\r\n\t\t\t<p class=\"margin-left-5\">\r\n\t\t\t\t<span class=\"text-black weight-600\">Time:<\/span> 17.December 2017 17:37:36<br \/>\r\n\t\t\t\t<span class=\"text-black weight-600\">API:<\/span> \/meet\/88a9135f-7f17-467b-ad9b-7b7b8037a964\/clubs<br \/>\r\n\t\t\t\t<span class=\"text-black weight-600\">Message:<\/span><br \/>The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.\r\n\t\t\t<\/p>"
}

i read something with this:

$.fn.dataTable.ext.errMode = 'throw';

        evlist.on(
            'error.dt', function( e, settings, techNote, message ) {
                console.log(e);
            } );

but i can not read the json to display it.

Andreas


Viewing all articles
Browse latest Browse all 81920

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>