fix(feat): better exception handling in uptime collector to pass tests

Change-Id: I6a63233247224bb674cf4866dbc3cf2183a3cb75