added basic error handling to controller set_methods