autobahn-java icon indicating copy to clipboard operation
autobahn-java copied to clipboard

onUserError not implemented

Open om26er opened this issue 5 years ago • 2 comments

The ABJ does not implement the onUserError, while we have the signature on the Session class, we don't really hook that to anything. https://github.com/crossbario/autobahn-java/blob/9d08106e43346297f603fbae1cee3076f57a22eb/autobahn/src/main/java/io/crossbar/autobahn/wamp/Session.java#L1377

om26er avatar Feb 10 '20 13:02 om26er

ok, yeah, we actually fire the listeners collected in addUserErrorListener;) there will be multiple locations where we have to add firing the hook .. best in probably to look at the twisted ABPy and component ABPy implementations ..

oberstet avatar Feb 10 '20 13:02 oberstet

It seems ABPy Component API does not implement/expose onUserError. Also for Java, it may make sense to give the "user error" in the exceptionally clause of the CompletableFuture. That way developers will know the context where the issue is coming and subsequently better handle it.

Providing errors in a separate, context-independent mechanism is likely to make the API complex

om26er avatar Feb 10 '20 13:02 om26er