DBusMessage.toGerror
bool toGerror()If message is not of type gio.types.DBusMessageType.Error does nothing and returns false.
Otherwise this method encodes the error in message as a #GError using gio.dbus_error.DBusError.setDbusError using the information in the gio.types.DBusMessageHeaderField.ErrorName header field of message as well as the first string item in message's body.
Returns
true if error was set, false otherwise.