Skip to content

Invalid JSON metadata in get_logs_with_metadata causes server error. #22897

@tirkarthi

Description

@tirkarthi

Apache Airflow version

2.2.5 (latest released)

What happened

Invalid JSON metadata in get_logs_with_metadata causes server error. The json.loads exception is not handled like validation in other endpoints.

http://127.0.0.1:8080/get_logs_with_metadata?execution_date=2015-11-16T14:34:15+00:00&metadata=invalid

What you think should happen instead

A proper error message can be returned

How to reproduce

Accessing below endpoint with invalid metadata payload

http://127.0.0.1:8080/get_logs_with_metadata?execution_date=2015-11-16T14:34:15+00:00&metadata=invalid

Operating System

Ubuntu 20.04

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions