fix: (frontend) clean up unsed error variable in try/catch block (#11325)

This commit is contained in:
rstar327 2025-10-13 17:13:11 +03:00 committed by GitHub
parent c0ce78c64a
commit 93e1cd44c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 11 additions and 11 deletions

View File

@ -121,7 +121,7 @@ class ConversationService {
reason?: string;
}>(url);
return data;
} catch (error) {
} catch {
// Error checking if feedback exists
return { exists: false };
}

View File

@ -120,7 +120,7 @@ export function InteractiveChatBox({
// Step 5: Handle failed results
handleFailedFiles(fileResults, imageResults);
} catch (error) {
} catch {
// Clear loading states and show error
clearLoadingStates(validFiles, validImages);
displayErrorToast("An unexpected error occurred while processing files");

View File

@ -90,7 +90,7 @@ export function ConversationCard({
}
}
// VS Code URL not available
} catch (error) {
} catch {
// Failed to fetch VS Code URL
}
}

View File

@ -23,7 +23,7 @@ export function useUrlSearch(inputValue: string, provider: Provider) {
);
setUrlSearchResults(repositories);
} catch (error) {
} catch {
setUrlSearchResults([]);
} finally {
setIsUrlSearchLoading(false);

View File

@ -28,7 +28,7 @@ export function CancelSubscriptionModal({
await cancelSubscriptionMutation.mutateAsync();
displaySuccessToast(t(I18nKey.PAYMENT$SUBSCRIPTION_CANCELLED));
onClose();
} catch (error) {
} catch {
displayErrorToast(t(I18nKey.ERROR$GENERIC));
}
};

View File

@ -39,7 +39,7 @@ export function CreateApiKeyModal({
onKeyCreated(newKey);
displaySuccessToast(t(I18nKey.SETTINGS$API_KEY_CREATED));
setNewKeyName("");
} catch (error) {
} catch {
displayErrorToast(t(I18nKey.ERROR$GENERIC));
}
};

View File

@ -32,7 +32,7 @@ export function DeleteApiKeyModal({
await deleteApiKeyMutation.mutateAsync(keyToDelete.id);
displaySuccessToast(t(I18nKey.SETTINGS$API_KEY_DELETED));
onClose();
} catch (error) {
} catch {
displayErrorToast(t(I18nKey.ERROR$GENERIC));
}
};

View File

@ -275,7 +275,7 @@ export function ConversationSubscriptionsProvider({
setActiveConversationIds((prev) =>
prev.includes(conversationId) ? prev : [...prev, conversationId],
);
} catch (error) {
} catch {
// Clean up the event handler if there was an error
delete eventHandlersRef.current[conversationId];
}

View File

@ -25,7 +25,7 @@ function PosthogInit() {
try {
const config = await OptionService.getConfig();
setPosthogClientKey(config.POSTHOG_CLIENT_KEY);
} catch (error) {
} catch {
displayErrorToast("Error fetching PostHog client key");
}
})();

View File

@ -140,7 +140,7 @@ export function useConversationNameContextMenu({
}
}
// VS Code URL not available
} catch (error) {
} catch {
// Failed to fetch VS Code URL
}
}

View File

@ -24,7 +24,7 @@ export function transformVSCodeUrl(vsCodeUrl: string | null): string | null {
}
return vsCodeUrl;
} catch (error) {
} catch {
// Silently handle the error and return the original URL
return vsCodeUrl;
}