Browse Source

add better messaging on registration failure

kb/add-usage-guide
Trent Larson 1 year ago
parent
commit
a96728bec5
  1. 10
      src/views/ContactsView.vue

10
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 });

Loading…
Cancel
Save