-
Notifications
You must be signed in to change notification settings - Fork 84
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix faultcode+faultstring and get UPnPError details #60
Conversation
cc @huin |
Thanks, looks good. There's a slight risk that existing code is pulling |
da5391f
to
c460521
Compare
What do you mean by risk of code If you think just adding fields to |
Yes. But I hadn't appreciated that that's how the XML unpacking worked - thanks for explaining that. In that case we can go with your original changes. |
5075caf
to
1b6e0b7
Compare
Cool, I removed that last change then. LMK when that can be merged & tagged 馃憤 |
That's merged in. Thanks :) |
Any chance a v1.2.0 could be introduced with this change ? :) |
Heh, woops. I actually drafted the release, and then failed to publish it. Done. :) |
馃憢 A small PR that does two things:
Fixes the parsing of
faultcode
/faultstring
fields.The change was introduced in this PR but I'm not sure why? Improve error handling聽#38
You've also properly set them in
v2alpha
: https://github.com/huin/goupnp/blob/main/v2alpha/soap/envelope/envelope.go#L23:L24And the specs clearly specify this case: https://openconnectivity.org/upnp-specs/UPnP-arch-DeviceArchitecture-v2.0-20200417.pdf
See page 74 as well as examples pages 83 & 84.
Parses some details of the optional
UPnPError
element. This will allow consumers that want to inspect the error to be able to easily retrieveerrorCode
anderrorDescription
. TheRaw
field is still there as a catch-all.