fix wrong error message in cart_list REST action

if cart_type is empty, the error message should not use the variable