I'd add an xhr.onerror function to reject the promise and, more importantly, to log an error message so that we can catch bugs where there is a mis-configuration and the expected files are not installed.