Skip to content

vda5050_controller: create error entry in state if action fails#67

Closed
alyquantillion wants to merge 1 commit into
inorbit-ai:humble-develfrom
Quantillion:feature/add_error_in_state_if_action_fails
Closed

vda5050_controller: create error entry in state if action fails#67
alyquantillion wants to merge 1 commit into
inorbit-ai:humble-develfrom
Quantillion:feature/add_error_in_state_if_action_fails

Conversation

@alyquantillion

@alyquantillion alyquantillion commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

Changes made:

  • When an action is finished, the action_states.result_description field of the order state is updated
  • When an action is failed, an error entry in the order state is created

These two behaviors are described in the VDA5050 standard (json schemas and section 6.10.6 in the actionStates description)


Note

Records result_description when actions finish and publishes a state error entry when an action fails.

  • Controller (vda5050_controller.py):
    • Action state updates:
      • Extend _update_action_status(action_id, action_status, result_description=""); when status is FINISHED, set action_state.result_description.
      • Pass through result_description from adapter in _get_state_from_adapter_callback and _process_vda_action_result_callback.
    • Error handling:
      • Add ActionErrors.ACTION_FAILED.
      • On VDACurrentAction.FAILED, append a VDAError with error_type="actionFailed", error_description from result_description, level FATAL, and an action_id reference; publish then clear.

Written by Cursor Bugbot for commit 48b2563. This will update automatically on new commits. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant