Uh oh!
There was an error while loading. Please reload this page.
Fix discover-node-selector response - #5043
Conversation
| return response as unknown as DiscoveryResponse<Response> | ||
| const responseBody: DiscoveryResponse<Response> = await response.json() | ||
| return responseBody |
There was a problem hiding this comment.
do other consumers of this care?
There was a problem hiding this comment.
like care about the type? technically there is a response type threaded through the whole function so keeping the types accurate
There was a problem hiding this comment.
its cause we using fetch in this case, so we have to .json here, whereas axios does this automatically! so this is to maintain the same api for both cases
There was a problem hiding this comment.
no, it's not new - this is from the forked version of DiscoveryProvider's _makeRequest that Dylan created for the new DN selector logic. The old path used Axios which auto parses the JSON response. This is to match feature parity with the old way
## Changelog - 2023-04-03 [ac2f3f3] Fix discover-node-selector response (#5043) [Dylan Jeffers] - 2023-04-03 [dfee3cc] SDK: Add getBlockers(), getBlockees(), unfurl(), and getPermissions() (#5041) [Marcus Pasell] - 2023-04-03 [1d8db84] SDK: Snake case DN selector services key (#5039) [Marcus Pasell] - 2023-04-03 [518758a] Storage v2: add image upload+polling, use CIDs, remove metadata (#5032) [Theo Ilie] - 2023-04-03 [0115b13] Bump sdk to v2.0.3-beta.2 [audius-infra]
## Changelog - 2023-04-03 [ac2f3f3] Fix discover-node-selector response (#5043) [Dylan Jeffers] - 2023-04-03 [dfee3cc] SDK: Add getBlockers(), getBlockees(), unfurl(), and getPermissions() (#5041) [Marcus Pasell] - 2023-04-03 [1d8db84] SDK: Snake case DN selector services key (#5039) [Marcus Pasell] - 2023-04-03 [518758a] Storage v2: add image upload+polling, use CIDs, remove metadata (#5032) [Theo Ilie] - 2023-04-03 [0115b13] Bump sdk to v2.0.3-beta.2 [audius-infra]
Description
Fixes issue where fetch response is not parsed