Skip to content

Commit 625086f

Browse files
authored
DATA-4502 Add error_message to python SDK (#975)
1 parent ee116d9 commit 625086f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/viam/app/data_client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,9 @@ class DataPipelineRun:
309309
data_end_time: datetime
310310
"""The end time of the data that was processed in the run."""
311311

312+
error_message: str
313+
"""The error message of the data pipeline run. Only set if the run failed."""
314+
312315
@classmethod
313316
def from_proto(cls, data_pipeline_run: ProtoDataPipelineRun) -> Self:
314317
return cls(
@@ -318,6 +321,7 @@ def from_proto(cls, data_pipeline_run: ProtoDataPipelineRun) -> Self:
318321
end_time=data_pipeline_run.end_time.ToDatetime(),
319322
data_start_time=data_pipeline_run.data_start_time.ToDatetime(),
320323
data_end_time=data_pipeline_run.data_end_time.ToDatetime(),
324+
error_message=data_pipeline_run.error_message,
321325
)
322326

323327
@dataclass

tests/test_data_pipelines.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
end_time=TIMESTAMP,
6060
data_start_time=TIMESTAMP,
6161
data_end_time=TIMESTAMP,
62+
error_message="",
6263
)
6364
]
6465

0 commit comments

Comments
 (0)