simplify error assertions