@ -326,6 +326,7 @@ import TopMessage from "@/components/TopMessage.vue";
import { APP_SERVER , AppString , NotificationIface } from "@/constants/app" ;
import {
db ,
logConsoleAndDb ,
retrieveSettingsForActiveAccount ,
updateAccountSettings ,
updateDefaultSettings ,
@ -337,6 +338,7 @@ import {
CONTACT_CSV_HEADER ,
CONTACT_URL_PREFIX ,
createEndorserJwtForDid ,
errorStringForLog ,
GiveSummaryRecord ,
getHeaders ,
isDid ,
@ -511,7 +513,8 @@ export default class ContactsView extends Vue {
) ;
/ / e s l i n t - d i s a b l e - n e x t - l i n e @ t y p e s c r i p t - e s l i n t / n o - e x p l i c i t - a n y
} catch ( error : any ) {
console . error ( "Error redeeming invite:" , error ) ;
const fullError = "Error redeeming invite: " + errorStringForLog ( error ) ;
logConsoleAndDb ( fullError , true ) ;
let message = "Got an error sending the invite." ;
if (
error . response &&
@ -670,7 +673,8 @@ export default class ContactsView extends Vue {
this . givenToMeConfirmed = givenToMeConfirmed ;
this . givenToMeUnconfirmed = givenToMeUnconfirmed ;
} catch ( error ) {
console . error ( "Error loading gives" , error ) ;
const fullError = "Error loading gives: " + errorStringForLog ( error ) ;
logConsoleAndDb ( fullError , true ) ;
this . $notify (
{
group : "alert" ,
@ -719,6 +723,9 @@ export default class ContactsView extends Vue {
3000 , / / k e e p i n g i t u p s o t h a t t h e " v i s i b i l i t y " m e s s a g e i s s e e n
) ;
} catch ( e ) {
const fullError =
"Error adding contacts from CSV: " + errorStringForLog ( e ) ;
logConsoleAndDb ( fullError , true ) ;
this . danger ( "An error occurred. Some contacts may have been added." ) ;
}
@ -785,6 +792,9 @@ export default class ContactsView extends Vue {
query : { contacts : JSON . stringify ( contacts ) } ,
} ) ;
} catch ( e ) {
const fullError =
"Error adding contacts from array: " + errorStringForLog ( e ) ;
logConsoleAndDb ( fullError , true ) ;
this . danger ( "The input could not be parsed." , "Invalid Contact List" ) ;
}
return ;
@ -934,7 +944,9 @@ export default class ContactsView extends Vue {
) ;
} )
. catch ( ( err ) => {
console . error ( "Error when adding contact to storage:" , err ) ;
const fullError =
"Error when adding contact to storage: " + errorStringForLog ( err ) ;
logConsoleAndDb ( fullError , true ) ;
let message = "An error prevented this import." ;
if (
err . message ? . indexOf ( "Key already exists in the object store." ) > - 1
@ -1011,7 +1023,8 @@ export default class ContactsView extends Vue {
) ;
}
} catch ( error ) {
console . error ( "Error when registering:" , error ) ;
const fullError = "Error when registering: " + errorStringForLog ( error ) ;
logConsoleAndDb ( fullError , true ) ;
let userMessage = "There was an error." ;
const serverError = error as AxiosError ;
if ( serverError . isAxiosError ) {
@ -1197,6 +1210,9 @@ export default class ContactsView extends Vue {
showContactGivesInline : newShowValue ,
} ) ;
} catch ( err ) {
const fullError =
"Error updating contact-amounts setting: " + errorStringForLog ( err ) ;
logConsoleAndDb ( fullError , true ) ;
this . $notify (
{
group : "alert" ,
@ -1206,10 +1222,6 @@ export default class ContactsView extends Vue {
} ,
5000 ,
) ;
console . error (
"Telling user to try again after contact-amounts setting update because:" ,
err ,
) ;
}
this . showGiveNumbers = newShowValue ;
if (