Error: "stream does not start with a json array" when making logpush job, incorrect error code?

I am trying to make a logpush job that sends an array JSON to axiom. I am getting an error:

{"errors":[{"code":1002,"message":"error validating destination: error writing object: error uploading to https: 400 {\"message\":\"stream does not start with a json array\"}"}],"messages":[],"result":null,"success":false}


looking up code 1002 I see that would mean Error 1002: DNS points to Prohibited IP according to https://support.cloudflare.com/hc/en-us/articles/360029779472-Troubleshooting-Cloudflare-1XXX-errors. Is this the case or should I go with the error message?

My request looks like this:
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/logpush/jobs' \
-H 'X-Auth-Key: <API_KEY>' \
-H 'X-Auth-Email: <EMAIL>' \
-H 'Content-Type: application/json' \
-d '{
  "name": "workers-logpush",
  "output_options": {
    "field_names": ["ClientIP", "EdgeStartTimestamp", "RayID", "Event", "EventTimestampMs", "Outcome", "Exceptions", "Logs", "ScriptName"],
    "sample_rate": 1.0,
    "timestamp_format": "rfc3339",
    "output_type": "ndjson",
    "batch_prefix": "[",
    "batch_suffix": "]",
    "record_prefix": "{",
    "record_suffix": "}",
    "record_delimiter": ","
  },
  "destination_conf": "https://cloud.axiom.co/api/v1/datasets/$DATASET_NAME/ingest?header_Authorization=Bearer%20$BEARER_TOKEN&header_content-type=application%2Fjson",
  "dataset": "workers_trace_events",
  "enabled": true
}'


It seems like maybe that error message is a middle server not interpreting the body correctly and forwarding it, and maybe the code is actually correct?
Was this page helpful?