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

How citizens of Earth (and Mars in future) will understand the reason of rest api failure? #168

Open
pPanda-beta opened this issue Oct 28, 2020 · 0 comments

Comments

@pPanda-beta
Copy link

Although I really like the good custom exceptions created in exceptions.py and the romantic one liner

_status_to_exception_type = dict((c.code, c) for c in HttpError.__subclasses__())

Yet it is not useful as per the following lines

self.load(self.client.request(self.method, self.url, **params))
except Exception:
self.load(self._data)

Sometimes atlas server goes down (503 mainly), which makes it impossible to identify whether the entity not found (404) or server is down.

Consider the following example :

entity = client.entity_unique_attribute('hive_table', qualifiedName=atlas_qn)
if entity.entity is None:
    print("I dont know what happened, could be missing or server down")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant