protected function parseFields(Resource $resource)
    {
        $fields = $resource->getFields();
        if (!is_array($fields)) {
            $this->sendError(static::ERROR_UNKNOWN_FIELDS, $fields);
        }
        return $fields;
    }