Whenever, by the terms of an obligation, a party thereto incurs a forfeiture, or a loss in the nature of a forfeiture, by reason of his failure to comply with its provisions, he may be relieved therefrom, upon making full compensation to the other party, except in case of a grossly negligent, willful, or fraudulent breach of duty.