404 let xhr = new XMLHttpRequest(); xhr.open('OPTIONS', 'url'); xhr.send({data: 'data'}); xhr.onreadystatechange = function() { if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 404) { console.log('Not Found'); } }