From 2f3117dfd4b847ed78f7624fed24e7cd961f55d5 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 11 Jul 2025 06:52:12 +0000 Subject: [PATCH] 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. --- src/views/HomeView.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 24df1d2a..9cb84878 100644 --- a/src/views/HomeView.vue +++ b/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 } }