ㄴ/는다는 것이

Used to say that you meant to do something but something ended up happening by accident.

것이 can be shortened to

It is often paired with 고 말았다.

Conjugation

Past
AV (V) 가다 간다는 것이
AV (C) 먹다 먹는다는 것이
Hada 하다 한다는 것이

Example Sentences

Polite

요리를 한다는 게 음식을 잊어버려서 타 버리고 말았어요.
I wanted to cook, buti forgot about the food and it ended up burned.