avadev / AvaTax-REST-V2-JS-SDK

Sales Tax API SDK for Javascript / Node and AvaTax REST
https://developer.avalara.com/sdk/
Apache License 2.0
28 stars 37 forks source link

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

Closed nymphetamineinside closed 1 year ago

nymphetamineinside commented 1 year ago

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!!

svc-developer commented 1 year ago

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

nymphetamineinside commented 1 year ago

it works as expected now, thank you!