Skip to content

The code returns incorrect response for any interactions with datahub graph entity when the URL is incorrect. #15490

@crankerkor

Description

@crankerkor

Any interaction with either client or a graph instance (except search.get_urns()) returns an unparseable response: JSONDecodeError: Expecting value: line 1 column 1 (char 0) when used without "api/gms" in the link.

To Reproduce
Steps to reproduce the behavior:

  1. Create a client using this code DataHubClient(server=base_url, token=token), where base_url - is the url of the Datahub instance (without api/gms).
  2. It may be used for client.search.get_urns(), but every other interaction such as client.entities.get(urn) will return the JSONDecodeError: Expecting value: line 1 column 1 (char 0).
  3. The same is also reproducable for graph such as
    config = DatahubClientConfig(
    server=base_url
    token=token
    )

graph = DataHubGraph(config)

Will work properly if you use server = base_url + "/api/gms"
Expected behavior
A clear and concise error, any suggestion such as "Please try adding api/gms or fixing your link" or at least the status code of the request should be returned instead of unclear JSONDecodeError.

Environment: Datahub is running on AWS EC2 instance with Docker container started using docker-quickstart.

Image Image

Metadata

Metadata

Assignees

Labels

bugBug report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions