ensure error message shows, and unset register flag if there's an API error
This commit is contained in:
@@ -9,7 +9,6 @@ tasks:
|
||||
- add button to front page to prompt for ideas for gratitude
|
||||
- show previous on "Your" screen
|
||||
- checkboxes: randomize vs show in order, show non-person-oriented messages, show only contacts, show only projects
|
||||
- remove the "backward" button when in the middle of the contact-browsing part (since they can't go back or forward)
|
||||
- bug - on fulfilling an offer, it shows "Someone not in Contacts" and not "you" for your own delivery
|
||||
- allow user to add a time when they want their daily notification
|
||||
- prompt for the name directly when they visit the QR scan page
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -90,10 +90,11 @@
|
||||
giving.
|
||||
<router-link
|
||||
:to="{ name: 'contact-qr' }"
|
||||
class="block text-center text-md font-bold uppercase bg-blue-500 text-white mt-2 mb-4 px-2 py-3 rounded-md"
|
||||
class="block text-center text-md font-bold uppercase bg-blue-500 text-white mt-2 px-2 py-3 rounded-md"
|
||||
>
|
||||
Show Them Your Identifier Info</router-link
|
||||
>
|
||||
<br />
|
||||
To double-check that you're registered,
|
||||
<br />
|
||||
<router-link :to="{ name: 'account' }" class="text-blue-500">
|
||||
|
||||
@@ -343,7 +343,7 @@ export default class NewEditProjectView extends Vue {
|
||||
if (Object.prototype.hasOwnProperty.call(serverError, "message")) {
|
||||
userMessage =
|
||||
(serverError.response?.data?.error?.message as string) ||
|
||||
userMessage; // This is info for the user.
|
||||
userMessage;
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
|
||||
Reference in New Issue
Block a user