File tree 2 files changed +2
-21
lines changed
2 files changed +2
-21
lines changed Original file line number Diff line number Diff line change @@ -152,8 +152,7 @@ async def execute(
152
152
# If we upload files, we will extract the files present in the
153
153
# variable_values dict and replace them by null values
154
154
nulled_variable_values , files = extract_files (
155
- variables = variable_values ,
156
- file_classes = self .file_classes ,
155
+ variables = variable_values , file_classes = self .file_classes ,
157
156
)
158
157
159
158
# Save the nulled variable values in the payload
@@ -222,10 +221,6 @@ async def execute(
222
221
result_text = await resp .text ()
223
222
log .info ("<<< %s" , result_text )
224
223
except ClientResponseError as e :
225
-
226
- # Check if the received response text is json pareable
227
- # use the parsed text or str(e) as the exception message
228
-
229
224
raise TransportServerError (str (e ), e .status ) from e
230
225
except Exception :
231
226
result_text = await resp .text ()
Original file line number Diff line number Diff line change 1
1
import json
2
2
import logging
3
- from json .decoder import JSONDecodeError
4
3
from typing import Any , Dict , Optional , Union
5
4
6
5
import requests
@@ -167,20 +166,7 @@ def execute( # type: ignore
167
166
if log .isEnabledFor (logging .INFO ):
168
167
log .info ("<<< %s" , response .text )
169
168
except requests .HTTPError as e :
170
-
171
- # Check if the received response text is json pareable
172
- # use the parsed text or str(e) as the exception message
173
-
174
- try :
175
- message = response .json ()
176
- if "errors" in "message" :
177
- return ExecutionResult (
178
- errors = message .get ("errors" ), data = message .get ("data" )
179
- )
180
- except JSONDecodeError :
181
- message = str (e )
182
-
183
- raise TransportServerError (message , e .response .status_code ) from e
169
+ raise TransportServerError (str (e ), e .response .status_code ) from e
184
170
except Exception :
185
171
raise TransportProtocolError ("Server did not return a GraphQL result" )
186
172
You can’t perform that action at this time.
0 commit comments