Close modal loader in case of failure too