Error handling regressed
oleg-codaio opened this issue · 1 comments
It looks like version 21.12.0 of this library completely regressed error handling. It was working fine before:
AvaTax-REST-V2-JS-SDK/lib/AvaTaxClient.js
Lines 98 to 100 in 8372d78
But someone decided it would be a good idea to add a length check:
AvaTax-REST-V2-JS-SDK/lib/AvaTaxClient.js
Lines 107 to 109 in 486ffaf
Of course, the response isn't guaranteed to be an array - it might just be a single top-level object, as is the case for what's returned by getTransactionByCode
:
Solution for now is to pin to 21.10.0
but this seems like a pretty careless release.
@oleg-codaio Thanks for the feedback. The issue has been fixed as part of 22.2.1 release.
Thanks.