Merge "Improve error handling." into nyc-andromeda-dev