Bug 48525: Improve error handling in nearby

Change-Id: I01bc59f83b3b7841530ab9c4026b9ebc13d516fc
Merge "Bug 48525: Improve error handling in nearby"