MB-9128: fix up error handling

Change-Id: Ib056149b782df883dd949e15770025455df983e3