all error cases, I think I should have covered them all in the testcases.