Skip to content

Conversation

@penelopus
Copy link
Contributor

@penelopus penelopus commented Aug 1, 2025

Description

refactor: isolate axios instance to prevent global interceptor side effects

  • fixes bug in Polygon client library where subsequent calls return undefined even though the network request succeeds
    • first fetch works and renders as expected
    • subsequent fetches retrieve data from API successfully (verified in browser network inspector), but API returns undefined

Related Issue

https://linear.app/mod-labs/issue/DVX-889/dev-fix-bug-w-subsequent-fetches-in-client-js-library

Motivation and Context

bugfix

How Has This Been Tested?

tested locally w/ fix

  • with this branch, run npm pack to generate a *.tgz
  • in sample project (using gist referenced above), link to local package w/ npm install <path_to_tgz>
  • verify initial and subsequent data fetches return expected payload (no undefined)

@penelopus penelopus self-assigned this Aug 1, 2025
Copy link
Collaborator

@mpatel18 mpatel18 left a comment

Choose a reason for hiding this comment

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

Appreciate the find on the pagination, I thought something like this wasn't happening when making the next_url calls.

@penelopus penelopus closed this Aug 4, 2025
@penelopus penelopus reopened this Aug 5, 2025
@penelopus penelopus force-pushed the chore/subsequent-calls branch from 113ca75 to fee9fc5 Compare August 5, 2025 04:54
…ffects

- fixes bug in Polygon client library where subsequent calls return undefined even though the network request succeeds
@penelopus penelopus force-pushed the chore/subsequent-calls branch from fee9fc5 to 379462a Compare August 5, 2025 04:55
@penelopus penelopus changed the title isolate axios instance to prevent global interceptor side effects [DVX-889] isolate axios instance to prevent global interceptor side effects Aug 5, 2025
@penelopus penelopus requested a review from mpatel18 August 5, 2025 05:15
Copy link
Collaborator

@mpatel18 mpatel18 left a comment

Choose a reason for hiding this comment

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

👍🏽

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.

3 participants