Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:error handling and region support #138

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

Amitkanswal
Copy link
Contributor

Support-

  • Proper error handling
  • Hosting service urls support

@Amitkanswal Amitkanswal requested a review from rijil-tr March 13, 2025 09:53
@Amitkanswal Amitkanswal requested a review from a team as a code owner March 13, 2025 09:53

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 enhances error handling and adds support for hosting service URLs. Key changes include:

  • Introducing new type definitions (ServiceURLsMap, RequestInitConfig, RequestConfigWithBaseUrl) to support service URLs.
  • Updating API request adapters and utility functions to integrate error handling and URL resolution.
  • Modifying the UI location module to utilize the new hosted endpoints configuration.

Reviewed Changes

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

Show a summary per file
File Description
src/types/api.type.ts Added new types for service URL and request configuration support.
src/utils/adapter.ts Updated dispatch functions with improved error handling and integration of hosted URLs.
src/utils/utils.ts Modified fetchToAxiosConfig and added isAbsoluteURL with baseURL resolution.
src/uiLocation.ts Updated the API method to include hostedEndpoints for service URL support.
src/types.ts Integrated new hosted endpoints config and extended region enums.
Comments suppressed due to low confidence (1)

src/utils/utils.ts:54

  • Consider adding an explicit type annotation to the 'url' parameter (e.g., url: string) to improve type clarity and safety.
function isAbsoluteURL(url) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant