//log errors to the console for datatables instead of the default alert
//see https://github.com/DataTables/DataTables/issues/378
$.fn.dataTable.ext.errMode = 'throw';
//see https://datatables.net/blog/2014-12-18
//used to allow sort dates in datetables with custom formats
$.fn.dataTable.moment = function (format, locale) {
let types = $.fn.dataTable.ext.type;
Here are a few lines from it because it is to big to post. It is from a package I believe. This issue is with the ext.errMode it is fine for everything else.