jawampa icon indicating copy to clipboard operation
jawampa copied to clipboard

wamp.error.no_such_procedure returns args null and null instead of [] and {}

Open aengelberg opened this issue 9 years ago • 1 comments

My client code gets tripped up whenever a wamp.error.no_such_procedure is received, because it seems to always get null as both the array arguments and keyval arguments. Is this intended, because WAMP allows RPC calls to optionally omit empty array and keval arguments? In that case, perhaps the client should be giving me empty JSON nodes ([] or {}) by default if I try to fetch the nonexistent arguments.

aengelberg avatar Jun 24 '15 16:06 aengelberg

Yes, that's currently intentional that missing args/kwargs parameters are marked as null and can in the other way also be used to send empty argument lists to the server.

Changing the behavior to use empty args structures would be also ok from my POV, but it would probably be worse for the performance. I would be open for pull requests which change the behavior.

Matthias247 avatar Jun 29 '15 22:06 Matthias247