From a96728bec5c30c83c936103c7c96c80b79d299b6 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 25 Jun 2023 16:41:32 -0600 Subject: [PATCH] add better messaging on registration failure --- src/views/ContactsView.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/ContactsView.vue b/src/views/ContactsView.vue index 7af1d24..8a07dec 100644 --- a/src/views/ContactsView.vue +++ b/src/views/ContactsView.vue @@ -530,7 +530,15 @@ export default class ContactsView extends Vue { try { const resp = await this.axios.post(url, payload, { headers }); //console.log("Got resp data:", resp.data); - if (resp.data?.success?.handleId) { + if (resp.data?.success?.embeddedRecordError) { + this.alertTitle = "Registration Still Unknown"; + let message = "There was some problem with the registration."; + if (typeof resp.data.success.embeddedRecordError == "string") { + message += " " + resp.data.success.embeddedRecordError; + } + this.alertMessage = message; + this.isAlertVisible = true; + } else if (resp.data?.success?.handleId) { contact.registered = true; db.contacts.update(contact.did, { registered: true });