From: Sebastián Ramírez Date: Thu, 2 Mar 2023 15:11:17 +0000 (+0100) Subject: 🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with... X-Git-Tag: 0.93.0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e9326de1619ecff41fe15b4e84714168ea68aaa7;p=thirdparty%2Ffastapi%2Ffastapi.git 🔊 Log GraphQL errors in FastAPI People, because it returns 200, with a payload with an error (#9171) --- diff --git a/.github/actions/people/app/main.py b/.github/actions/people/app/main.py index 2a0cdfc35a..2bf59f25e6 100644 --- a/.github/actions/people/app/main.py +++ b/.github/actions/people/app/main.py @@ -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