Gracefully handle wrong parameter number to WAMP procedures
See original GitHub issueWe should gracefully handle (or allow the app to handle) the situation where a WAMP procedure is called with wrong number of positional arguments:
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] Traceback (most recent call last):
File "/home/oberstet/cpy372_7/lib/python3.7/site-packages/autobahn/wamp/websocket.py", line 95, in onMessage
self._session.onMessage(msg)
File "/home/oberstet/cpy372_7/lib/python3.7/site-packages/autobahn/wamp/protocol.py", line 939, in onMessage
on_reply = txaio.as_future(endpoint.fn, *invoke_args, **invoke_kwargs)
File "/home/oberstet/cpy372_7/lib/python3.7/site-packages/txaio/tx.py", line 428, in as_future
return ensureDeferred(fun(*args, **kwargs))
TypeError: buy_key() missing 1 required positional argument: 'signature'
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] dropping connection to peer tcp4:127.0.0.1:8081 with abort=True: I dropped the WebSocket TCP connection: WAMP Internal Error (buy_key() missing 1 required positional argument: 'signature')
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] session leaving 'wamp.close.transport_lost'
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] wamp.close.transport_lost:
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] >>> Maker session DETACHED from data market (details=CloseDetails(reason=<wamp.close.transport_lost>, message='WAMP transport was lost without closing the session before'))
2019-02-22T15:31:39+0100 [XBRMrktMkr 24056] Stopping factory <autobahn.twisted.websocket.WampWebSocketClientFactory object at 0x7f657992bba8>
2019-02-22T15:31:41+0100 [XBRMrktMkr 24056] connecting once using transport type "websocket" over endpoint "tcp"
2019-02-22T15:31:41+0100 [XBRMrktMkr 24056] Starting factory <autobahn.twisted.websocket.WampWebSocketClientFactory object at 0x7f6575397d68>
2019-02-22T15:31:41+0100 [XBRMrktMkr 24056] >>> Maker session ATTACHED to data market (details=SessionDetails(realm=<realm1>, session=6500367308499916, authid=<HMQY-5EFY-5GEV-LUXM-P3P6-H5VY>, authrole=<xbrmm>, authmethod=anonymous, authprovider=static, authextra={'x_cb_node_id': None, 'x_cb_peer': 'tcp4:127.0.0.1:46350', 'x_cb_pid': 24043}, resumed=None, resumable=None, resume_token=None)) on thread 140074355159168
2019-02-22T15:31:41+0100 [XBRMrktMkr 24056] Registered 8 procedures
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to handle the error that occurs on giving wrong number of ...
When i give wrong number of parameters in a function , i get errors. How do I handle it? ... It is not...
Read more >PHP Error Handling and Logging - Tutorial Republic
PHP Error Handling. In this tutorial you will learn how to use the PHP's error handling functions to deal with the error conditions...
Read more >Remote Node API — Crossbar.io FX 20.7.2.dev2 documentation
Returns the list of workers currently running on this node. Parameters. filter_types –. Returns. List of worker processes. Return type. list[dict].
Read more >4. Release Notes — Buildbot 1.1.2 documentation
LDAP bytes/unicode handling has been fixed to work with Python 3. This means that LDAP authentication, REMOTE_USER authentication, and LDAP avatars now work...
Read more >WAMP Programming — autobahn 22.8.1.dev1 documentation
These components use either Remote Procedure Calls (RPC) or Publish/Subscribe (PubSub) to ... For example, a single WAMP router can manage multiple Realms, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can’t repeat the “second failure” above in the interactive session (neither 3.6.3 or 3.7.3):
I also added an integration test-case for this, which also passes … so I’m closing this, unless there’s another way to repeat the problem?
txaio 18.8.1