Browse Source

fix(homeview): consolidate duplicate registration check logging

Remove duplicate API calls and consolidate error logging for registration
status checks to eliminate redundant 400 error messages in development.

- Remove duplicate checkRegistrationStatus() call from mounted() sequence
- Modify initializeIdentity() to only log unexpected errors (not 400s)
- Eliminate duplicate fetchEndorserRateLimits() API calls
- Preserve all other error logging and functionality

This reduces console noise for expected 400 responses while maintaining
proper error handling for actual registration failures.
pull/142/head
Matthew Raymer 2 weeks ago
parent
commit
cb14fe0df7
  1. 14
      src/views/HomeView.vue

14
src/views/HomeView.vue

@ -473,7 +473,7 @@ export default class HomeView extends Vue {
await this.initializeIdentity();
await this.loadSettings();
await this.loadContacts();
await this.checkRegistrationStatus();
// Registration check already handled in initializeIdentity()
await this.loadFeedData();
await this.loadNewOffers();
await this.checkOnboarding();
@ -602,10 +602,14 @@ export default class HomeView extends Vue {
this.isRegistered = true;
}
} catch (error) {
this.$logAndConsole(
`[HomeView] Registration check failed: ${error}`,
true,
);
// Consolidate logging: Only log unexpected errors, not expected 400s
const axiosError = error as any;
if (axiosError?.response?.status !== 400) {
this.$logAndConsole(
`[HomeView] Registration check failed: ${error}`,
true,
);
}
// Continue as unregistered - this is expected for new users
}
}

Loading…
Cancel
Save