zbysir opened a new issue, #38:
URL: https://github.com/apache/airflow-client-go/issues/38

   ```
   ➜  ~ curl -i -X GET 'https://airflow.xxx.com/api/v1/dags/xx/dagRuns/xxx' \
   -H 'Content-Type: application/json' -H 'Accept: application/json' \
   --user "xxx:xxx" \
   -d '{}'
   HTTP/2 404
   date: Wed, 01 Feb 2023 07:42:55 GMT
   content-type: application/problem+json
   content-length: 263
   server: gunicorn
   x-robots-tag: noindex, nofollow
   
   {
     "detail": "DAGRun with DAG ID: 'xxx' and DagRun ID: 'xxx' not found",
     "status": 404,
     "title": "DAGRun not found",
     "type": 
"https://airflow.apache.org/docs/apache-airflow/2.5.0/stable-rest-api-ref.html#section/Errors/NotFound";
   }
   ```
   
   In airflow version 2.5.0, Content-type header in error response is 
`application/problem+json`, but in this repo the json content-type is check by 
regexp 
   ```
   jsonCheck = 
regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
   ```
   
   The regexp can't mach `application/problem+json`, I guess that's the problem.
   
   > About 
[problem+json](https://datatracker.ietf.org/doc/html/draft-nottingham-http-problem-07)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to