|
|
@ -1016,6 +1016,17 @@ export default class AccountViewView extends Vue { |
|
|
|
} |
|
|
|
} catch (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; |
|
|
@ -1044,17 +1055,12 @@ export default class AccountViewView extends Vue { |
|
|
|
this.limitsMessage = |
|
|
|
(data?.error?.message as string) || "Bad server response."; |
|
|
|
console.error( |
|
|
|
"Got bad response retrieving limits, which usually means user isn't registered. Server says:", |
|
|
|
this.limitsMessage, |
|
|
|
"Got bad response retrieving limits, which usually means user isn't registered:", |
|
|
|
error, |
|
|
|
); |
|
|
|
} else if ( |
|
|
|
error instanceof Error && |
|
|
|
error.message === |
|
|
|
"Attempted to load Give records with no identifier available." |
|
|
|
) { |
|
|
|
this.limitsMessage = "You have no identifier."; |
|
|
|
} else { |
|
|
|
// Handle other unknown errors |
|
|
|
this.limitsMessage = "Got an error retrieving limits."; |
|
|
|
console.error("Got some error retrieving limits:", error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|