Skip to content
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

Report service errors from "op": "status" #371

Open
kaikoehn opened this issue Jun 30, 2020 · 3 comments
Open

Report service errors from "op": "status" #371

kaikoehn opened this issue Jun 30, 2020 · 3 comments

Comments

@kaikoehn
Copy link

I'm using ros2-web-bridge as a web-bridge and noticed that when doing a service call which caused a TypeError on the webbridge the error was not reported in any of the callbacks (callback, failedCallback) of the client.

Client library call:
service.callService(new ROSLIB.ServiceRequest(args), handleResponse, handleError)

WS Request:

{
  "op": "call_service",
  "id": "call_service:coco/v1/stop_mapping:2",
  "service": "coco/v1/stop_mapping",
  "type": "api_v1_interfaces/srv/StopMapping",
  "args": {
    "foo": 1
  }
}

WS Response:

{
  "op": "status",
  "level": "error",
  "msg": "call_service: TypeError: Invalid argument: generate_localization_map in StopMapping_Request",
  "id": "call_service:coco/v1/stop_mapping:2"
}

Are there plans to to propagate this kind of status with roslibjs as well? Or is this some specifics of ros2-web-bridge?

I could try to make a PR but I'm not sure if this is part of the standard that should be supported or not.

@Rayman
Copy link
Contributor

Rayman commented Jun 30, 2020

callService has to following signature, so on error I would expect failedCallback to be called. You say this is not happening?

Service.prototype.callService = function(request, callback, failedCallback) {

@kaikoehn
Copy link
Author

Correct - neither of the callbacks were called for me. I was using the npm package / v.1.1.0.

@Rayman
Copy link
Contributor

Rayman commented Jul 1, 2020

A PR to fix that would be appreciated 😄

k-aguete pushed a commit to k-aguete/roslibjs that referenced this issue Oct 21, 2022
Bumps [grunt-shell](https://github.com/sindresorhus/grunt-shell) from 2.1.0 to 3.0.1.
- [Release notes](https://github.com/sindresorhus/grunt-shell/releases)
- [Commits](sindresorhus/grunt-shell@v2.1.0...v3.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@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

No branches or pull requests

2 participants