diff --git a/frontend/src/views/falukant/FamilyView.vue b/frontend/src/views/falukant/FamilyView.vue index 459bab1..8aa7e97 100644 --- a/frontend/src/views/falukant/FamilyView.vue +++ b/frontend/src/views/falukant/FamilyView.vue @@ -355,15 +355,16 @@ export default { console.log(error.response); if (error.response?.status === 412) { const retryAtIso = error.response?.data?.retryAt; + const code = error.response?.data?.error || error.response?.data?.message; if (retryAtIso) { const retryStr = new Date(retryAtIso).toLocaleString(navigator.language, { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit' }); - const baseMsg = this.$t(`falukant.family.sendgift.error.${error.response.data.error}`); + const baseMsg = this.$t(`falukant.family.sendgift.error.${code}`); this.$root.$refs.errorDialog.open(`${baseMsg} — ${this.$t('falukant.family.sendgift.nextGiftAt')}: ${retryStr}`); } else { - this.$root.$refs.errorDialog.open(`tr:falukant.family.sendgift.error.${error.response.data.error}`); + this.$root.$refs.errorDialog.open(`tr:falukant.family.sendgift.error.${code}`); } } else { this.$root.$refs.errorDialog.open(`tr:falukant.family.sendgift.error.generic`);