If this was already a resit, that may not be an option, unless, possibly, there were serious mitigating circumstances that the university was aware of?
OP, what do the academic regulations say for your course? These (or a link to them) should be in your student handbook.