avadev/AvaTax-REST-V2-JS-SDK

You forced us to do two `await res.text()`, we got `body used already for:...`

nymphetamineinside opened this issue · 2 comments

Hello

We're updating from 22.10.0 to 23.2.0

Our code:
image

We have 2 issues here.

  1. Major one is that we get:
    body used already for: http://localhost:2901/api/v2/taxratesbyzipcode/download/2023-03-14 at Response.consumeBody (/app/node_modules/node-fetch/lib/index.js:344:30)

It happens because you have extra res.text() here
image

If we comment it, everything works.

  1. The second issue is minor type issue, we fixed it on our side (First screenshot, { date: updated as unknown as Date }). date param should be string instead of Date.

Could you please take a look?

Thanks in advance!!

Fixed in release 23.3.0 Please give it a try and let us know if you have any further issues https://github.com/avadev/AvaTax-REST-V2-JS-SDK/releases/tag/23.3.0

it works as expected now, thank you!