Improved error handling for search results (Closes #51)