如果文件不存在,即使设置了错误处理程序,jQuery ajax也会出错

我的JavaScript中包含以下代码:

ajaxCall() {
 return new Promise(function(resolve, reject) {
   jQuery.ajax({
      async: true
      data: { 
         ajaxCallid: "e4f7b812-579b-a347-11f7-ce660ce79b72", 
         javascript: true 
      },
      dataType: "jsonp",
      timeout: 10000,
      type: "GET",
      url: "https://my.site.url.com/my.json"
      xhrFields: { 
         withCredentials: true 
      }
   }).done(function(data) {
      // ...process the data...
      resolve(data);
   }).fail(function(jqXHR, textStatus) {
     // ... process errors...
     // test the nature of the error, and build an error = {} object
     resolve(error);
   });
 };
}

What I am expecting, is that, if I call the following function, and the https://my.site.url.com/my.json file does not exist, the fail callback of the jquery ajax should be ran, and my Promise should resolve to an error object built by the fail callback.

Instead of this, the fail callback fires, the error object is built and returned, but I also get an error in my console, sent by jQuery, that looks something like this:

语法错误:预期的表达式,得到了'<'          jQuery 6           多美瓦尔           全球评价           文字脚本           ajax转换           做完了           打回来

在我看来,完全会引发错误,jQuery尝试将服务器发送的结果解析为JSON结果(在文件不存在的情况下,它不是,apache在其中抛出html错误消息这个案例)。

If I am correct regarding on the nature of this error, is there any way to tell jQuery, to not try to parse the result as a json, in case any kind of error is being raised, and the fail callback is being fired?

I am using jquery 3.4.1.