buffet: Don't crash if user is passing bad parameters via D-Bus.

With this change, 'buffet_client RegisterDevice' now returns useful
information and the buffet daemon doesn't crash:

 # buffet_client RegisterDevice
 [0212/144637:ERROR:logging.h(777)] Failed to call method: org.chromium.Buffet.Manager.RegisterDevice: object_path= /org/chromium/Buffet/Manager: org.freedesktop.DBus.Error.Failed: buffet/missing_parameter:Parameter ticket_id not specified
 [0212/144637:ERROR:dbus_method_invoker.h(110)] CallMethodAndBlockWithTimeout(...): Domain=dbus, Code=org.freedesktop.DBus.Error.Failed, Message=buffet/missing_parameter:Parameter ticket_id not specified
 Failed to receive a response: buffet/missing_parameter:Parameter ticket_id not specified

BUG=brillo:193
TEST=Manually tested.

Change-Id: I70a90293f5f8226cdaaf1f5bf0fbe46b8984b23a
Reviewed-on: https://chromium-review.googlesource.com/249340
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
2 files changed
tree: 79a8f169437beb10fc2daff172b2691b1ecbf6fa
  1. buffet/