Skip to content

Commit

Permalink
feat(ingest): print detailed GMS error messages (datahub-project#6519)
Browse files Browse the repository at this point in the history
Co-authored-by: Harshal Sheth <[email protected]>
  • Loading branch information
2 people authored and cccs-Dustin committed Feb 1, 2023
1 parent 985f4b5 commit 5ec090e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metadata-ingestion/src/datahub/cli/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,11 @@ def post_entity(
curl_command,
)
response = session.post(url, payload)
if not response.ok:
try:
log.info(response.json()["message"].strip())
except Exception:
log.info(f"post_entity failed: {response.text}")
response.raise_for_status()
return response.status_code

Expand Down

0 comments on commit 5ec090e

Please sign in to comment.