vda5050_controller: create error entry in state if action fails#67
Conversation
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on November 19
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| """ | ||
| if action: | ||
| self._update_action_status(action.action_id, VDACurrentAction.FINISHED) | ||
| self._update_action_status(action.action_id, VDACurrentAction.FINISHED, action.result_description) |
There was a problem hiding this comment.
Bug: Action Object Missing Expected Attribute
The code attempts to access action.result_description where action is of type VDAAction, but result_description is only a field on VDACurrentAction, not VDAAction. This will cause an AttributeError when the stateRequest instant action is processed. The result_description for stateRequest actions should likely be an empty string or a constant value since it's a built-in action type.
Changes made:
action_states.result_descriptionfield of the order state is updatedThese two behaviors are described in the VDA5050 standard (json schemas and section 6.10.6 in the
actionStatesdescription)Note
Records
result_descriptionwhen actions finish and publishes a state error entry when an action fails.vda5050_controller.py):_update_action_status(action_id, action_status, result_description=""); when status isFINISHED, setaction_state.result_description.result_descriptionfrom adapter in_get_state_from_adapter_callbackand_process_vda_action_result_callback.ActionErrors.ACTION_FAILED.VDACurrentAction.FAILED, append aVDAErrorwitherror_type="actionFailed",error_descriptionfromresult_description, levelFATAL, and anaction_idreference; publish then clear.Written by Cursor Bugbot for commit 48b2563. This will update automatically on new commits. Configure here.