private function getFormErrorData(Form $form)
    {
        if ($form->isValid()) {
            // A JsonErrorResponse was created with a valid form-- no errors will be found
            return $this->getResponseData('An error occurred while processing the submitted information');
        }

        $errors = $this->getErrors($form);
        $message = $this->getMainErrorMessage($form);

        return $this->getResponseData($message, $errors);
    }