-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More strict check for topic of all unsubscribe-related operations #87
Comments
qiuzhong
changed the title
More strict check for all unsubscribe-related operations
More strict check for topic of all unsubscribe-related operations
Mar 29, 2018
minggangw
pushed a commit
to minggangw/ros2bridge_suite-experiment
that referenced
this issue
Apr 8, 2018
Before this patch, when the bridge received the operation code 'unsubscribe', it will not validate the topic name(e.g. validity of the topic or if it existed). This patch implements that when receiving the 'unsubscribe' op, the bridge will valide the name of the topic first. If the name itself is invalid, an error will return. If the topic name doesn't exist, a warning will return. Fix RobotWebTools#87
minggangw
pushed a commit
that referenced
this issue
Apr 8, 2018
Before this patch, when the bridge received the operation code 'unsubscribe', it will not validate the topic name(e.g. validity of the topic or if it existed). This patch implements that when receiving the 'unsubscribe' op, the bridge will valide the name of the topic first. If the name itself is invalid, an error will return. If the topic name doesn't exist, a warning will return. Fix #87
qiuzhong
added a commit
to qiuzhong/ros2-web-bridge
that referenced
this issue
Apr 8, 2018
Since issue RobotWebTools#87 is fixed and the test cases commented in `test-unsubscribe.js` can pass and we uncomment it.
Verified as PR #89 comments. |
minggangw
pushed a commit
that referenced
this issue
Apr 8, 2018
Since issue #87 is fixed and the test cases commented in `test-unsubscribe.js` can pass and we uncomment it.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
All the
unsubscribe
-related operations:unsubscribe
andunsubscribe_service
should be treated as more strict check, like type checking or whether the topic exists.Here is the current implementation of
unsubscribe
operation.This is simply hands the control to the
resourceProvide
duringunsubscribe
and it only handles the normal branch: when this topic exists.As a result, invalid type of topic brings a
none
level response, which means theunsubscribe
succeed. This is wrong and confusing.What we expected:
topic
type: a error returned.topic
type but not existed, a warning returned.For the
unsubscribe_service
operation, same proposal had been issued in the comments of PR #82.The text was updated successfully, but these errors were encountered: