error handling if no slug defined