mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +00:00
DummyKeyringModule provides a fake string as the JSON credential used to instantiate a GoogleCredential. Of course this would not work and when the metric reporter requests a GoogleCredential in the main thread. This causes the FOSS build to crash on startup, because it defaults to use DummyKeyringModule. This change allows a graceful handling of such an error by wrapping any calls to instantiate a metric reporter in a try block. Note that any attempt to write to stackdriver will still fail, but that happens in a different thread and will not make the whole program crash. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177183337