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

Log HTTP Message Body for 401 responses #89

Open
leet4tari opened this issue Mar 15, 2023 · 0 comments
Open

Log HTTP Message Body for 401 responses #89

leet4tari opened this issue Mar 15, 2023 · 0 comments

Comments

@leet4tari
Copy link
Contributor

Logs are missing the HTTP Message Body when receiving 401 responses, even in trace.
Sample reply bodies:

{
  "message": "Bad credentials",
  "documentation_url": "https://docs.github.com/graphql"
}

or

{
  "message": "Personal access tokens with fine grained access do not support the GraphQL API",
  "documentation_url": "https://docs.github.com/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql"
}

Reproduce sample with curl

curl -i -H "Authorization: bearer <token>" -X POST -d " \
 { \
   \"query\": \"query { viewer { login }}\" \
 } \
" https://api.github.com/graphql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants