Beginning error handling in modal window