Clean up some error-handling in codesearch.