XHR "error" event listener not working when URL is wrong. Confused as to why
Working through Colt Steele's JavaScript course, and learning about XHR. This snippet is supposed to throw an error when the URL isn't correct. If I type gibberish like
/planetiuhnuoidhfugn/ it still works/I'm not seeing an error in Chrome DevTools. It'll throw the error if I change "swapi" to "swap" or "dev" to "co" as "swapi.co" no longer exists: