Factored out common code into applyErrorMessage function.
When a server error is caught by applyErrorMessage (“ERROR” link), do not render the whole oops.jelly page.
Just pick out the <div id="error-description"> from JENKINS-20772.
NPE in form validation when configured on a non-AbstractProject, like a workflow job.