Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

fix: ask gaxios for text and not json#152

Merged
JustinBeckwith merged 1 commit intogoogleapis:masterfrom
JustinBeckwith:txt
Jan 15, 2019
Merged

fix: ask gaxios for text and not json#152
JustinBeckwith merged 1 commit intogoogleapis:masterfrom
JustinBeckwith:txt

Conversation

@JustinBeckwith
Copy link
Contributor

I'm not entirely sure why this works today, but I noticed this while making some compatibility fixes in gaxios. I think the intent here was to have json-bigint always do the JSON.parse of the response from the metadata server. If that's the case - we should just ask for text from gaxios, since JSON is the default.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 13, 2019
retryConfig: {noResponseRetries},
params: options.params
params: options.params,
responseType: 'text'

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

Copy link
Contributor

@ofrobots ofrobots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I don't understand how it worked before though. JSON.parse in gaxios of Really Large Numbers should have lost accuracy. It would be worth finding out why that ended up working.

Otherwise, LGTM.

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

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants