mirror of
https://github.com/Kvan7/Exiled-Exchange-2.git
synced 2026-09-28 15:45:58 +00:00
better error for failied league loading
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
<span class="text-red-400">Failed to load leagues</span>
|
||||
<button class="btn ml-2" @click="retry">Retry</button>
|
||||
</div>
|
||||
<div>Error: {{ leaguesService.loadingError }}</div>
|
||||
<pre class="text-gray-500 whitespace-normal">Error: {{ leaguesService.loadingError }}</pre>
|
||||
<div class="font-fontin-bold">Verify that the realm is not under maintenance and pathofexile.com is loading.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -30,6 +30,7 @@ export class LeaguesService {
|
||||
|
||||
try {
|
||||
const response = await fetch('https://api.pathofexile.com/leagues?type=main&realm=pc&compact=1')
|
||||
if (!response.ok) throw new Error(JSON.stringify(Object.fromEntries(response.headers)))
|
||||
const leagues: Array<{ id: string }> = await response.json()
|
||||
const tradeLeagues = leagues.filter(league => !league.id.startsWith('SSF '))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user