Determinations such as the one herein must disclose a rational basis for the exercise of discretion (Matter of Shedlock v Connelie, 66 AD2d 433, 434, affd 48 NY2d 943), and hearings are not required as a prerequisite to the exercise of discretion. Finally, when the record fully discloses the basis for the determination, the rule for the court to follow is: " 'Insofar as the record reveals a reasonable basis for the Superintendent’s decision and there being no indication that it was affected by an error of law or was arbitrary and capricious or that it constituted an abuse of discretion, this court may not substitute its judgment for that of the said official [citations omitted].’ ” (Matter of Sauer v Connelie, 71 AD2d 770, 772.) The problem in this case is that it appears that the superintendent’s decision is premised in part upon information as to the petitioner’s background that he did not give her any opportunity to clarify, and her affidavit on appeal would show the information was erroneously construed by the superintendent. The superintendent admittedly relied upon his alleged erroneous view of such information and whether or -not her *1032alleged sexual conduct alone would have resulted in a denial of her appointment is unknown. Ordinarily, such a defect should require a remittal for reconsideration as to eligibility. However, the petitioner has alleged illegal discrimination against her because of her sex. Such a bias would constitute an error of law and/or an arbitrary and capricious determination. While the facts supporting the allegation are minimal, she does allege in her papers that she was subjected to questioning as to her sexuality which differed from questions asked of men and further, that the superintendent does not consider her alleged conduct to be morally reprehensible if done by men. While factual allegations are difficult in the absence of disclosure by the superintendent, nevertheless, she has alleged that if she is being considered of bad moral character because of adultery, her State trooper accomplice has been expressly excused of any penalty therefor. The present record is sufficient to justify the exercise of discretion by Special Term to order a factual hearing on the issue of sexual discrimination and the order should be affirmed.