simplified error render logic