Geoclue simple obscures Portal denied error
When using Geoclue simple in a sandboxed application, if the portal permission is denied or fails for any other explicit reason, Geoclue simple obscures the error and reports everything as a generic IO failure:
https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/master/libgeoclue/gclue-simple.c#L557
This is despite the fact it appears to get a reference to the actual error. It also differs from the approach taken when creating the session via xdp:
https://gitlab.freedesktop.org/geoclue/geoclue/-/blob/master/libgeoclue/gclue-simple.c#L579
Here are examples of errors the portal location may end with which are being obscured by Geoclue simple but are useful to application developers:
- Location access disallowed (system wide): https://github.com/flatpak/xdg-desktop-portal/blob/main/src/location.c#L669
- Location access denied (app specific): https://github.com/flatpak/xdg-desktop-portal/blob/main/src/location.c#L681
(As an aside, thank you for supplying the simple API. It really is fantastic to use and the flexibility of automatically handling sandboxed contexts without needing to juggle that in application code is great!)