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

autobahn.Error should contain the "details" parameter #556

Open
trombipeti opened this issue Oct 6, 2021 · 1 comment
Open

autobahn.Error should contain the "details" parameter #556

trombipeti opened this issue Oct 6, 2021 · 1 comment

Comments

@trombipeti
Copy link

trombipeti commented Oct 6, 2021

autobahn.Error now contains error, args and kwargs. According to the spec, there's always a "details" parameter available (it's a dict).
This should be stored in the Error class.

In the code, I see this in the handlers for the ERROR messages:

var details = msg[3];
var error = new Error(msg[4], msg[5], msg[6]);

And the details seems to be not used. So I think it would be relatively easy to implement.
I can make a PR if you like.

Thanks!

Edit: this details parameter seems to be ignored for other types of messages, too. I start to think, maybe it's intentional?

@oberstet
Copy link
Contributor

oberstet commented Oct 19, 2021

in general, the details attribute is present for symmetry reasons and to support future extensibility, and I think in the case of ERROR messages, eg Crossbar.io should add stuff like Callee information (the WAMP peer that returned an error).

I also think that autobahn-js does already expose details for call results .. not sure. In any case, if we do so, then we might as well want to expose details not only in call results but also call errors. @om26er what do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants