Skip to content

fix: Handle action rejection and server timeout#1139

Merged
bjsowa merged 7 commits intoRobotWebTools:ros2from
aithon-robotics:action-handling
Feb 22, 2026
Merged

fix: Handle action rejection and server timeout#1139
bjsowa merged 7 commits intoRobotWebTools:ros2from
aithon-robotics:action-handling

Conversation

@Spir0u
Copy link
Contributor

@Spir0u Spir0u commented Nov 25, 2025

Public API Changes
Actions forward an error when not available/they get cancelled

Description

  1. When no server is available, I raise an Eexception to get feedback.
  2. throwing an exception in goal_response_cb does not work properly, therefore I return it in the self.result. Probably there would be a better option, but this was working for me.
  3. The result was still none when the action was cancelled, so I put the empty result directly in the return of execute_callback.

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal
@bjsowa bjsowa self-requested a review November 28, 2025 13:48
@bjsowa bjsowa changed the title handling action rejection, server timeout fix: Handle action rejection and server timeout Feb 22, 2026
@bjsowa bjsowa merged commit 728ed0d into RobotWebTools:ros2 Feb 22, 2026
3 checks passed
bjsowa added a commit that referenced this pull request Feb 22, 2026
* add server timeout exception

* forward rejected goal handles

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal

* return an empty result when result was None due to cancellation/abortion

* fix lint error

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa added a commit that referenced this pull request Feb 22, 2026
* add server timeout exception

* forward rejected goal handles

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal

* return an empty result when result was None due to cancellation/abortion

* fix lint error

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa added a commit that referenced this pull request Feb 22, 2026
* add server timeout exception

* forward rejected goal handles

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal

* return an empty result when result was None due to cancellation/abortion

* fix lint error

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa added a commit that referenced this pull request Feb 22, 2026
* add server timeout exception

* forward rejected goal handles

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal

* return an empty result when result was None due to cancellation/abortion

* fix lint error

---------

Co-authored-by: Błażej Sowa <bsowa123@gmail.com>
bjsowa added a commit that referenced this pull request Feb 22, 2026
* add server timeout exception

* forward rejected goal handles

The goal_response_cb should not throw an exception, so the exception is passed in the result and then raised in  send_goal

* return an empty result when result was None due to cancellation/abortion

* fix lint error

---------

Co-authored-by: Spir0u <28966599+Spir0u@users.noreply.github.com>
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.

2 participants