Skip to content

Commit

Permalink
fix(ingest): improve error reporting in emit_all (datahub-project#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
hsheth2 authored and chakru-r committed Jan 11, 2025
1 parent 51a7ced commit e64baec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions metadata-ingestion/src/datahub/ingestion/graph/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,11 @@ def make_rest_sink(
with DatahubRestSink(PipelineContext(run_id=run_id), sink_config) as sink:
yield sink
if sink.report.failures:
logger.error(
f"Failed to emit {len(sink.report.failures)} records\n{sink.report.as_string()}"
)
raise OperationalError(
f"Failed to emit {len(sink.report.failures)} records",
info=sink.report.as_obj(),
f"Failed to emit {len(sink.report.failures)} records"
)

def emit_all(
Expand Down

0 comments on commit e64baec

Please sign in to comment.