fix(JOYNAT): fix GraphQL variables encoding
This commit is contained in:
@@ -437,8 +437,13 @@ class RTLP(Service):
|
||||
response.raise_for_status()
|
||||
|
||||
response_data = response.json()
|
||||
|
||||
if response_data.get("errors"):
|
||||
raise ValueError(f"GraphQL errors for '{operation_name}': {response_data['errors']}")
|
||||
|
||||
if 'data' not in response_data:
|
||||
raise ValueError(f"Invalid GraphQL response for '{operation_name}': missing 'data' field.")
|
||||
self.log.error(f"GraphQL response for '{operation_name}' missing 'data' field.")
|
||||
raise ValueError(f"Invalid GraphQL response for '{operation_name}'.")
|
||||
|
||||
return response_data['data']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user