Adding error case.