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

Non-CLI parts of the library must not write anything to stdout/stderr #678

Closed
1 task done
outring opened this issue Aug 18, 2023 · 2 comments · May be fixed by #679
Closed
1 task done

Non-CLI parts of the library must not write anything to stdout/stderr #678

outring opened this issue Aug 18, 2023 · 2 comments · May be fixed by #679
Labels

Comments

@outring
Copy link

outring commented Aug 18, 2023

Issue summary

Currently, if the error happens during the GraphQL request the response body is being printed to stdout along with an empty line

Libraries must not print anything to the console because they're being used in other applications and the way these applications treat the stdout/stderr could vary:

  • User-facing CLIs could use the the stdout to present the data to users and they do it in a way they need it. Having a raw response in the stdout wouldn't be a desirable behavior
  • Server-side application often use stdout/stderr to stream logs. And logs are often expected to be in a certain format. Unexpectedly formatted log entries can negatively affect log viewers/analyzers

Expected behavior

The library doesn't do raw prints to the stdout. It does the logging using the standard way of logging in Python using logging module

Actual behavior

The library prints raw GraphQL responses

Steps to reproduce the problem

  1. Issue an incorrect request to GraphQL API which leads to a HTTP error

Reduced test case

N/A


Checklist

  • I have described this issue in a way that is actionable (if possible)
@github-actions
Copy link

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

@github-actions github-actions bot added the Stale label Oct 18, 2023
Copy link

github-actions bot commented Nov 1, 2023

We are closing this issue because it has been inactive for a few months.
This probably means that it is not reproducible or it has been fixed in a newer version.
If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant