Merge \\\"Improved error handling.\\\" into nyc-dev am: bbd27419ac am: 75e6dde051
am: 80b18227bf

Change-Id: I169f9018575d60d8d503b3a33cd49252266eeaa6