Set invalid resource instead of unknown method in API responses