added test coverage for 404, 500 and other exception handling, just to be safe