Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return Json for all Not Found views in REST API #12131

Closed
ephraimbuddy opened this issue Nov 6, 2020 · 0 comments · Fixed by #12305
Closed

Return Json for all Not Found views in REST API #12131

ephraimbuddy opened this issue Nov 6, 2020 · 0 comments · Fixed by #12305
Labels
area:API Airflow's REST/HTTP API kind:bug This is a clearly a bug

Comments

@ephraimbuddy
Copy link
Contributor

Currently if an API URL that does not exist is requested, an html page is returned instead of JSON

Apache Airflow version:2.0

What happened:
Making a request against an endpoint that does not exist returns an html page

What you expected to happen:

I expected it to return 404 error in JSON indicating that the URL was not found

How to reproduce it:

  1. Start airflow website and scheduler in breeze.
  2. Make a request against an endpoint that does not exist e.g http://localhost:28080/api/v1/getconnectiond
  3. Notice that an html page is returned instead of a json
    cc: @mik-laj
@ephraimbuddy ephraimbuddy added the kind:bug This is a clearly a bug label Nov 6, 2020
@mik-laj mik-laj added the area:API Airflow's REST/HTTP API label Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:API Airflow's REST/HTTP API kind:bug This is a clearly a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants