Hui Zheng

10/23/2020, 11:35 PM
Hello, our flow run had failed with this error this afternoon.
Copy code
Failed to set task state with error: HTTPError('400 Client Error: Bad Request for url: <>')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/prefect/engine/cloud/", line 124, in call_runner_target_handlers
    state = self.client.set_task_run_state(
  File "/usr/local/lib/python3.8/site-packages/prefect/client/", line 1399, in set_task_run_state
    result = self.graphql(
  File "/usr/local/lib/python3.8/site-packages/prefect/client/", line 275, in graphql
    result = <|>(
  File "/usr/local/lib/python3.8/site-packages/prefect/client/", line 230, in post
    response = self._request(
  File "/usr/local/lib/python3.8/site-packages/prefect/client/", line 400, in _request
    response = self._send_request(
  File "/usr/local/lib/python3.8/site-packages/prefect/client/", line 333, in _send_request
  File "/usr/local/lib/python3.8/site-packages/requests/", line 941, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: <>
Is it a cloud API error? Anything I could do to avoid it or re-try it in a better way?

Chris White

10/23/2020, 11:37 PM
Hi @Hui Zheng - this means that the GraphQL payload that your client sent could not be interpreted by our API; this is usually caused by poorly formatted GraphQL of some kind. What version of Prefect were you running when you saw this?