added error handling to model and weatherdatamodel