-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/mkt 11337 error hosting support #139
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
Conversation
Signed-off-by: Amitkanswal <[email protected]>
Signed-off-by: Amitkanswal <[email protected]>
Signed-off-by: Amitkanswal <[email protected]>
There was a problem hiding this 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 refactors the API adapter and error handling logic to support improved error hosting while extending endpoint configuration.
- Refactored API adapter functions and error handling in axios utilities.
- Updated region handling and introduced endpoint configurations in UI location and type definitions.
- Adjusted tests to cover the new endpoints and region behavior.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/utils/utils.ts | Added sanitizeResponseHeader and handleApiError functions for improved error handling. |
src/utils/adapter.ts | Updated dispatchAdapter and dispatchApiRequest to leverage new error handling. |
src/uiLocation.ts | Integrated endpoints property and updated region typing. |
src/types/api.type.ts & src/types.ts | Extended type definitions to support endpoints and additional region values. |
test/* | Updated tests to require endpoints and new region behavior. |
Comments suppressed due to low confidence (1)
src/types.ts:259
- [nitpick] Ensure that the newly introduced enum value 'GCP_EU' is consistent with the existing naming conventions and intended region identifiers throughout the codebase.
GCP_EU = "GCP_EU",
Signed-off-by: Amitkanswal <[email protected]>
Signed-off-by: Amitkanswal <[email protected]>
There was a problem hiding this 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 refactors the API adapter and error handling logic to improve error processing and support for dynamic endpoints.
- Refactored utility functions to include a header conversion helper and update region formatting.
- Enhanced error handling in the API adapter to standardize error responses.
- Updated tests and type definitions to incorporate new endpoints and region types.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/utils/utils.ts | Added a header conversion function and updated region formatting. |
src/utils/adapter.ts | Refactored error handling with improved error response formation. |
src/uiLocation.ts | Integrated new endpoints and adjusted region type usage. |
src/types/api.type.ts | Added a new type definition for Contentstack endpoints. |
src/types.ts | Updated region definitions and type usage for region-related values. |
test/* | Updated and added tests to align with the new region and endpoint changes. |
Signed-off-by: Amitkanswal <[email protected]>
Changes-