fixed functionality to display error messages when unsuccessfully approving document