Skip to content

.getJSON method invoked on xml throws sdk error, masking the original problem #118

Open
@railz-guli

Description

@railz-guli

We're using nodeJs sdk, version 3.0.2 and for certain requests we make with makeApiCall the error we're getting is Error: AuthResponse is not JSON at AuthResponse.getJson (/var/app/current/node_modules/intuit-oauth/src/response/AuthResponse.js:106:29) at OAuthClient.createError

After investigating the error it came to our attention that the sdk is getting back an xml instead of JSON. Moreover, the way sdk handles/throws/logs the error masks the original error we're getting in the xml (we want to see the issues in production). For the short term, if you could add logs before calling .getJSON on the response it would be very helpful.

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions