Fix issue #74: Foundry's icons are not available: its bridge is not set up, or it cannot be reached right now.
All checks were successful
Test / test (push) Successful in 2s

This commit is contained in:
Gitea OpenCode Agent
2026-10-15 19:24:18 +00:00
parent 6df7d57376
commit 06144e1623
3 changed files with 82 additions and 2 deletions

View File

@@ -62,7 +62,12 @@ async function Load(dir, offset = 0) {
? { ...page, files: [...listing.value.files, ...page.files] }
: page;
} catch (requestError) {
error.value = t('foundry.errors.icons-unavailable');
// The route answers every real failure with an i18n key in `msg`, but
// axios rejects a non-2xx response, so this catch would otherwise blame
// the bridge for anything at all — a campaign without a world address,
// a folder that went missing. Read the reason off the response and say
// that instead (Syndria98/dragonroll#74).
error.value = t(requestError.response?.data?.msg || 'foundry.errors.icons-unavailable');
} finally {
loading.value = false;
}