Add error handling to dbus function calls.