Changed model error to throw