Handle 404 for unknown users and groups in the API.