add assertion in the error description