store the error if transaction is failed