diff --git a/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py b/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py index d0b84aa..19de655 100644 --- a/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py +++ b/src/spaceone/dashboard/manager/data_table_manager/data_source_manager.py @@ -115,9 +115,13 @@ def load( if additional_labels := self.options.get("additional_labels"): self._add_labels(additional_labels) + + self.state = "AVAILABLE" + self.error_message = None + except Exception as e: - self.error_message = e.message if hasattr(e, "message") else str(e) self.state = "UNAVAILABLE" + self.error_message = e.message if hasattr(e, "message") else str(e) _LOGGER.error(f"[load] add {self.source_type} source error: {e}") return self.df diff --git a/src/spaceone/dashboard/manager/data_table_manager/data_transformation_manager.py b/src/spaceone/dashboard/manager/data_table_manager/data_transformation_manager.py index 1f3e201..8b42bf4 100644 --- a/src/spaceone/dashboard/manager/data_table_manager/data_transformation_manager.py +++ b/src/spaceone/dashboard/manager/data_table_manager/data_transformation_manager.py @@ -91,9 +91,13 @@ def load( self.query_data_table(granularity, start, end, vars) elif self.operator == "EVAL": self.evaluate_data_table(granularity, start, end, vars) + + self.state = "AVAILABLE" + self.error_message = None + except Exception as e: - self.error_message = e.message if hasattr(e, "message") else str(e) self.state = "UNAVAILABLE" + self.error_message = e.message if hasattr(e, "message") else str(e) _LOGGER.error(f"[load] {self.operator} operation error: {e}") return self.df