Added error condition to ajax modal