Updated Karma error handling.