handle invalid resource ID errors properly