handling missing resource for api requests