buffet: Handle authentication failures better

Previously the lack of an access token would raise a "list index out
of range" assertion, and cause a 500 response. This was causing buffet
to fail since it didn't realize it needed to reauthenticate.

TEST=test_that <ip_address> buffet_Registration
BUG=brillo:378

Change-Id: Ifdbc64c6a28cbedea7cd176b395666be975da71d
Reviewed-on: https://chromium-review.googlesource.com/254560
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Nathan Bullock <nathanbullock@google.com>
Tested-by: Nathan Bullock <nathanbullock@google.com>
2 files changed