Closed
Description
If I understand correctly, abp.ajax
fails silently and leaves a hanging promise when jqXHR.status === 0
. According to the comment in the abovementioned code, it is expected that the request is aborted in such case. However,
jqXHR.status === 0
can occur in other situations, such as the host is down, or CORS preflight has been rejected. The caller is entitled to know this;- It's generally not a good idea to make a promise hanging.
Is it the code was supposed to be like this (which is still not good enough IMO as it still hangs the promise in certain scenarios)?
if(jqXHR.status === 0 && jqXHR.statusText === 'abort')
// ↑ && instead of ||