handled invalid cart error and updated test case