Square Off in Multilegged Options Strategy

Hi everyone,
I’m new to options trading. I have been using basket order feature to utilise hedge benefits and take sell positions with less margin requirement. I had a query which got me wondering. Let’s say I have vertical spread in my open positions and I chose to square off both of the legs. Due to some reason, one of the square off order fails (let’s presume the short position fails to square off due to large bid ask spread). What will happen in this case? Will I be required to deposit additional margin or my basket(one short and one long) will not get squared off?