better error handling within views