forked from jsnbuchanan/crowd-funder-for-time-pwa
refine error message when duplicate contact is input
This commit is contained in:
@@ -587,12 +587,19 @@ export default class ContactsView extends Vue {
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error("Error when adding contact to storage:", err);
|
||||
let message = "An error prevented this import.";
|
||||
if (
|
||||
err.message?.indexOf("Key already exists in the object store.") > -1
|
||||
) {
|
||||
message =
|
||||
"A contact with that DID is already in your contact list. Edit them directly below.";
|
||||
}
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
title: "Contact Not Added",
|
||||
text: "An error prevented this import.",
|
||||
text: message,
|
||||
},
|
||||
-1,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user