From 9746e4b4f6f9129cd72031034227c5066f4c07b9 Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Thu, 29 Jan 2026 14:34:45 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Improve=20error=20handling=20and=20?= =?UTF-8?q?formatting=20in=20tournament=20detail=20component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/challonge/TournamentDetail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue b/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue index 14fa9ca..66c81f3 100644 --- a/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue +++ b/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue @@ -108,12 +108,12 @@ const errorMessage = computed(() => { } // Fallback - try multiple approaches - + // Try to get status code directly if (err.status) { return `Error ${err.status}: Request failed`; } - + // Try to stringify for debugging try { const errorStr = JSON.stringify(err); @@ -124,13 +124,13 @@ const errorMessage = computed(() => { } catch (e) { // Ignore stringify errors } - + // Use toString if available and not [object Object] const str = err.toString ? err.toString() : String(err); if (str && str !== '[object Object]') { return str; } - + console.error('Unable to parse error:', err); return 'An error occurred loading tournament details. Check console for details.'; });