fix: enhance error handling for login and update launch button text based on server connection status
This commit is contained in:
parent
c97cfabfa4
commit
8acb33f844
@ -48,7 +48,12 @@ export const ezppfarm = {
|
||||
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36 Edg/128.0.0.0',
|
||||
},
|
||||
});
|
||||
if (request.error) return undefined;
|
||||
console.log(request.error);
|
||||
if (request.error) {
|
||||
if (request.error.status >= 500 && request.error.status < 600)
|
||||
throw new Error('Server not reachable');
|
||||
return undefined;
|
||||
}
|
||||
return request.data;
|
||||
},
|
||||
};
|
||||
|
@ -297,7 +297,7 @@
|
||||
}}
|
||||
>
|
||||
<Play />
|
||||
Launch
|
||||
Launch {$server_connection_fails > 1 ? 'offline' : ''}
|
||||
</Button>
|
||||
</div>
|
||||
<div
|
||||
|
Loading…
x
Reference in New Issue
Block a user