Could some one explain why my code doesn't detect a 404 error?

It’s driving me mad. Nothing seems to work…

try this , after success
,error: function(){
console.log(“Error”)
$(“body”).append("

" + streamer + "has either deleted their account or doesn’t exist!
");