Add first_error_details as custom variable in reporter
![tomasu](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar8.png)
tomasu
Registered Posts: 3 ✭
I'm trying to add a custom variable to reporter, first_error_detail:
settings = scenario.get_last_finished_run() details = settings.get_details() details.first_error_details # >> {'message': "Error in Python process: At line 135: <class 'KeyError'>: rebates"}
However I'm able to find any documentation about the mapping from the above method to the json in the custom variable creation:
import json # compute your additional variables from the list of report items # and return them as a dictionary. def get_variables(items_json, scenario_run_json, step_run_output_json): items = json.loads(items_json) return {}
I'm assuming it resides in scenario_run_json, but with no schema or documentation to refer to, it's proving to be quite the exercise. Any help here would be greatly appreciated!
Tagged: