Skip to content

Commit

Permalink
Fix open-metadata#2901: fixed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
ulixius9 committed Feb 22, 2022
1 parent 1224d20 commit 540ec87
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions ingestion/src/metadata/ingestion/ometa/ometa_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,13 +415,25 @@ def _get(
)
return entity(**resp)
except APIError as err:
logger.error(
"GET %s for %s." "Error %s - %s",
entity.__name__,
path,
err.status_code,
err,
)
if err.status_code == 404 and entity.__name__ == "DatabaseService":
logger.error(
"GET %s for %s."
"Error %s - creating databaseService instance for %s",
entity.__name__,
path,
err.status_code,
path.split("/")[-1],
)

else:
logger.error(
"GET %s for %s." "Error %s - %s",
entity.__name__,
path,
err.status_code,
err,
)

return None

def get_entity_reference(
Expand Down

0 comments on commit 540ec87

Please sign in to comment.