mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
dbusService: Don't double-wrap remote errors
Returning a GLib.Error from a method invocation will encode the error when sent over the wire. In case the error itself is already an encoded remote error, just passing it on will result in double wrapping. Avoid that by stripping any remote error information before returning it. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
This commit is contained in:
parent
0c705aefc1
commit
a5d33026f0
1 changed files with 1 additions and 0 deletions
|
|
@ -75,6 +75,7 @@ export class ServiceImplementation {
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (error instanceof GLib.Error) {
|
if (error instanceof GLib.Error) {
|
||||||
|
Gio.DBusError.strip_remote_error(error);
|
||||||
invocation.return_gerror(error);
|
invocation.return_gerror(error);
|
||||||
} else {
|
} else {
|
||||||
let name = error.name;
|
let name = error.name;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue