mirror of
https://github.com/fastapi/fastapi.git
synced 2026-02-23 18:26:42 -05:00
🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error (#9171)
This commit is contained in:
committed by
GitHub
parent
97effae92d
commit
e9326de161
4
.github/actions/people/app/main.py
vendored
4
.github/actions/people/app/main.py
vendored
@@ -381,6 +381,10 @@ def get_graphql_response(
|
||||
logging.error(response.text)
|
||||
raise RuntimeError(response.text)
|
||||
data = response.json()
|
||||
if "errors" in data:
|
||||
logging.error(f"Errors in response, after: {after}, category_id: {category_id}")
|
||||
logging.error(response.text)
|
||||
raise RuntimeError(response.text)
|
||||
return data
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user