]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with...
authorSebastián Ramírez <tiangolo@gmail.com>
Thu, 2 Mar 2023 15:11:17 +0000 (16:11 +0100)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2023 15:11:17 +0000 (15:11 +0000)
.github/actions/people/app/main.py

index 2a0cdfc35afc8c57667922037311fe8bd3eeca17..2bf59f25e62f807d9af524d3cafa7ebc8d4857a0 100644 (file)
@@ -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