Skip to content

Conversation

@goastler
Copy link
Member

@goastler goastler commented Jul 8, 2025

No description provided.

Copilot AI review requested due to automatic review settings July 8, 2025 15:42
@goastler goastler self-assigned this Jul 8, 2025
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 replaces the existing fetch-based HTTP client with Axios (including a default timeout) and adjusts class formatting in one API file.

  • Swapped out fetch calls for axios.get/axios.post with a 5 s default timeout in HttpClientBase.ts
  • Removed the old JSON responseHandler and streamlined error handling
  • Updated brace placement for the ProviderApi class declaration

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/api/src/api/ProviderApi.ts Moved the class’s opening { inline with the implements clause for consistency
packages/api/src/api/HttpClientBase.ts Replaced fetch with Axios, added default timeout and JSON header, removed handler
Comments suppressed due to low confidence (1)

packages/api/src/api/HttpClientBase.ts:24

  • [nitpick] The new Axios-based fetch method and its default timeout behavior aren't covered by existing tests. Adding unit tests for successful responses, timeout scenarios, and error handling will help prevent regressions.
	protected async fetch<T>(input: RequestInfo, config: AxiosRequestConfig = {}): Promise<T> {

forgetso
forgetso previously approved these changes Jul 8, 2025
@goastler
Copy link
Member Author

@HughParry is wary of axios, apparently past portal issues?

@HughParry
Copy link
Contributor

Needs testing! This adds helpers to base lvl http client so should be more tested across all services before it's ready for review

@HughParry HughParry marked this pull request as draft July 29, 2025 09:35
@forgetso forgetso force-pushed the main branch 2 times, most recently from c3bc3c5 to b9f10d3 Compare September 11, 2025 14:22
@forgetso forgetso force-pushed the fix/verify-endpoint-timeout branch from 54770eb to 45d558f Compare September 11, 2025 14:22
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.

4 participants