Skip to content

Commit

Permalink
fix(component-library): display error when input validation fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Haberkamp committed Jan 8, 2025
1 parent 2237bfc commit 33d422b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const props = defineProps<{
const errorMessage = computed(() => {
if (!props.error) return "";
if (!props.error.code) {
return t(props.error.detail);
}
const translation = t(props.error.code, props.error.parameters || {});
const noTranslationFound = translation === props.error.code.toString();
Expand Down

0 comments on commit 33d422b

Please sign in to comment.