add error handling to settingscontroller