Skip to content

Log HTTP Message Body for 401 responses #89

@leet4tari

Description

@leet4tari

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

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