-
Notifications
You must be signed in to change notification settings - Fork 84
Description
Describe the bug
I am working on a project where WampSharp acts as a WAMP host and autobahn-cpp is used to call RPC methods.
When a RPC call is invoked that is not yet registered, the error "wamp.error.no_such_procedure" is returned.
According to the protocol https://wamp-proto.org/_static/wamp_latest.html#call-error the format should be:
[ERROR, CALL, CALL.Request|id, Details|dict, Error|uri] (or 2 other variants)
Where "Details" must be a dictionary.
The protocol lists the following example:
[8, 48, 7814135, {}, "wamp.error.no_such_procedure"]
However, WampSharp uses the value null instead of an empty dictionary, for example:
[8,48,1,null,"wamp.error.no_such_procedure",["no procedure 'master.primary.index.get' registered"]]"
When autobahn-cpp processes the error, it expects the 'Details' parameter to be a dictionary, which is not the case. This causes a protocol error exception to be thrown, instead of reporting the actual no_such_procedure error.
Expected Behavior
For the sake of compatibility, I think both WampSharp and autobahn-cpp should be patched.
WampSharp should return an empty Details dictionary when a no_such_procedure error occurs.
Autobahn-cpp should treat 'null' values for the Details dictionary as an empty dictionary.
Platforms / Versions
WampSharp 18.10.1 running on .NET 4.7.2 on Windows 7 SP1
autobahn-cpp 18.4.1 compiled with MSVC 15.7.3