|
@ -1016,6 +1016,17 @@ export default class AccountViewView extends Vue { |
|
|
} |
|
|
} |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
this.handleRateLimitsError(error); |
|
|
this.handleRateLimitsError(error); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
await db.open(); |
|
|
|
|
|
db.settings.update(MASTER_SETTINGS_KEY, { |
|
|
|
|
|
isRegistered: false, |
|
|
|
|
|
}); |
|
|
|
|
|
this.isRegistered = false; |
|
|
|
|
|
} catch (err) { |
|
|
|
|
|
console.error("Got an error marking user not registered:", err); |
|
|
|
|
|
// already set an error notification for the user |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.loadingLimits = false; |
|
|
this.loadingLimits = false; |
|
@ -1044,17 +1055,12 @@ export default class AccountViewView extends Vue { |
|
|
this.limitsMessage = |
|
|
this.limitsMessage = |
|
|
(data?.error?.message as string) || "Bad server response."; |
|
|
(data?.error?.message as string) || "Bad server response."; |
|
|
console.error( |
|
|
console.error( |
|
|
"Got bad response retrieving limits, which usually means user isn't registered. Server says:", |
|
|
"Got bad response retrieving limits, which usually means user isn't registered:", |
|
|
this.limitsMessage, |
|
|
error, |
|
|
); |
|
|
); |
|
|
} else if ( |
|
|
|
|
|
error instanceof Error && |
|
|
|
|
|
error.message === |
|
|
|
|
|
"Attempted to load Give records with no identifier available." |
|
|
|
|
|
) { |
|
|
|
|
|
this.limitsMessage = "You have no identifier."; |
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// Handle other unknown errors |
|
|
this.limitsMessage = "Got an error retrieving limits."; |
|
|
|
|
|
console.error("Got some error retrieving limits:", error); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|