diff --git a/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue b/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue
index 72e12bf..2c7bf62 100644
--- a/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue
+++ b/code/websites/pokedex.online/src/components/challonge/TournamentDetail.vue
@@ -35,7 +35,7 @@
⚠️
- {{ error }}
+ {{ errorMessage }}
@@ -69,7 +69,7 @@ const props = defineProps({
default: false
},
error: {
- type: String,
+ type: [String, Error],
default: null
},
isExpanded: {
@@ -78,6 +78,15 @@ const props = defineProps({
}
});
+/**
+ * Format error message from string or Error object
+ */
+const errorMessage = computed(() => {
+ if (!props.error) return '';
+ if (typeof props.error === 'string') return props.error;
+ return props.error.message || 'An error occurred';
+});
+
/**
* Format tournament details as pretty-printed JSON
*/