minor tweak to error handling to improve ui user experience