XeroAPI / xero-node

Xero Node SDK for OAuth 2.0 generated from XeroAPI/Xero-OpenAPI
http://developer.xero.com/
MIT License
197 stars 159 forks source link

Attempt to parse object as JSON results in "JSON parse body failed" written to console #686

Closed drew-r closed 2 months ago

drew-r commented 3 months ago

SDK you're using (please complete the following information): Version 5.1.0 but looks present in 6.0.0

Describe the bug There is an attempt to parse what is already an object as JSON, which throws an error causing 'JSON parse body failed' to be written to the console.

To Reproduce Call getBankTransactionAttachments etc.

Expected behavior There is no attempt to JSON.parse & nothing is written to the console

It's not ideal for libraries to be writing to the console at all unless some verbosity/tracing is explicitly requested for example through a DEBUG env var

github-actions[bot] commented 3 months ago

PETOSS-440

github-actions[bot] commented 3 months ago

Thanks for raising an issue, a ticket has been created to track your request

sangeet-joy-tw commented 2 months ago

Hey @drew-r

We have removed the unnecessary json parsing code in our latest xero-node v9.0.0.

Please try our new version and let us know with any further issues.