handle beforeSubmit server errors