Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

app sample broken: TypeError: The GET method cannot be used with a body #1246

Closed
kintel opened this issue Apr 18, 2020 · 2 comments · Fixed by #1257
Closed

app sample broken: TypeError: The GET method cannot be used with a body #1246

kintel opened this issue Apr 18, 2020 · 2 comments · Fixed by #1257
Assignees
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@kintel
Copy link
Contributor

kintel commented Apr 18, 2020

Environment details

  • OS: macOS
  • Node.js version: 10.20.1
  • npm version: 6.14.4
  • @google-cloud/trace-agent version: 4.2.5

Steps to reproduce

cd samples
npm install
npm start
curl localhost:8080
-> "TypeError: The `GET` method cannot be used with a body"

Notes

It looks like this example is using the got API wrongly: The json argument is supposed to be a serializable POJO, not a boolean: https://github.com/sindresorhus/got#json

@product-auto-label product-auto-label bot added the api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. label Apr 18, 2020
@kintel
Copy link
Contributor Author

kintel commented Apr 18, 2020

Idea: We should have an automated test of this example, as this is used as the official Node.js example for the Cloud Trace product

@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 19, 2020
@bcoe bcoe added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Apr 20, 2020
@bcoe
Copy link
Contributor

bcoe commented Apr 20, 2020

We should have an automated test of this example, as this is used as the official Node.js

I agree, this would be smart 👍 we already run sample-tests as part of CI/CD.

@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Apr 20, 2020
gcf-merge-on-green bot pushed a commit that referenced this issue May 7, 2020
App sample has error: TypeError: The `GET` method cannot be used with a body
This pull request is to update the body to an json response option

Fixes #1246 🦕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the googleapis/cloud-trace-nodejs API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@kintel @bcoe @yoshi-automation and others