Tested model_code error handling and fixed exception text