Hi - I am trying to get some direction for the fol...
# prefect-community
i
Hi - I am trying to get some direction for the following error when a
StartFlowRun
is run from within another flow. Unexpected error: ClientError('400 Client Error: Bad Request for url: https://api.prefect.io/graphql\nThis is likely caused by a poorly formatted GraphQL query or mutation but the response could not be parsed for more details') Traceback (most recent call last): File "/home/ilivni/miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 361, in _send_request response.raise_for_status() File "/home/ilivni/miniconda3/envs/py38lmap/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.prefect.io/graphql The above exception was the direct cause of the following exception:
Copy code
Traceback (most recent call last):
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
    new_state = method(self, state, *args, **kwargs)
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 865, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/utilities/executors.py", line 299, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/utilities/tasks.py", line 454, in method
    return run_method(self, *args, **kwargs)
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/tasks/prefect/flow_run.py", line 177, in run
    flow_run_id = client.create_flow_run(
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 1094, in create_flow_run
    res = self.graphql(create_mutation, variables=dict(input=inputs))
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 298, in graphql
    result = <http://self.post|self.post>(
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 213, in post
    response = self._request(
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 445, in _request
    response = self._send_request(
  File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 374, in _send_request
    raise ClientError(f"{exc}\n{graphql_msg}") from exc
prefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: <https://api.prefect.io/graphql>
This is likely caused by a poorly formatted GraphQL query or mutation but the response could not be parsed for more details
Thanks in advance
c
Hi itay - we’ll need more information to debug; it seems that some piece of information you’re using to configure this task is malformed
i
@Chris White Ok. I will try to put a toy example together.
👍 1