diff options
Diffstat (limited to 'src/renderer/gameserver/news.ts')
-rw-r--r-- | src/renderer/gameserver/news.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/renderer/gameserver/news.ts b/src/renderer/gameserver/news.ts index b748777..094172c 100644 --- a/src/renderer/gameserver/news.ts +++ b/src/renderer/gameserver/news.ts @@ -26,6 +26,9 @@ export namespace News { // Fetches only the most recent entry function request(url:string):Promise<string>{ return new Promise((res, rej)=>{ var xhr = new XMLHttpRequest(); + xhr.addEventListener("error", (ev)=>{ + rej(ev); + }); xhr.open('GET', url); xhr.onload = function() { if (xhr.status === 200) { |