atlasclient
atlasclient copied to clipboard
How citizens of Earth (and Mars in future) will understand the reason of rest api failure?
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
https://github.com/jpoullet2000/atlasclient/blob/02b3e7d9a6596d1123fc22b6bfed08d60105d19e/atlasclient/base.py#L622-L624
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")