Added additional error handling to controller in case of missing param.