Skip to content

Conversation

@ChingEnLin
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings September 2, 2025 13:53
@ChingEnLin ChingEnLin merged commit ac687b7 into production Sep 2, 2025
3 checks passed
@github-actions
Copy link

github-actions bot commented Sep 2, 2025

🎉 This PR is included in version 2.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds centralized authentication error handling to improve user experience when authentication tokens expire or authentication fails. The changes introduce a new utility module for detecting and handling various authentication error scenarios with user-friendly error messages.

  • Introduces a new authErrorHandler.ts utility module with functions to detect authentication errors and provide user-friendly messages
  • Refactors existing authentication token acquisition logic to use centralized error handling
  • Updates error handling in UI components to display appropriate messages for authentication issues

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
frontend/utils/authErrorHandler.ts New utility module providing authentication error detection and user-friendly error message generation
frontend/services/userDataService.ts Adds error handling wrapper around token acquisition
frontend/services/dbService.ts Refactors token acquisition into reusable helper function with centralized error handling
frontend/pages/QueryGeneratorPage.tsx Updates error handling to use new authentication error detection utilities
frontend/tests/utils/authErrorHandler.test.ts Test suite for the new authentication error handling utilities
Comments suppressed due to low confidence (1)

frontend/services/dbService.ts:1

  • The getAzureCosmosAccounts function contains duplicate token acquisition logic that should use the new getAuthenticatedToken helper function. This creates code duplication since the same logic is now available in the helper function.
/**

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants