```python:inference/core/workflows/core_steps/composition/workflow_caller/v1.py
import logging
from typing import Optional

from inference.core.roboflow_api import get_workflow_specification

_logger = logging.getLogger(__name__)

def _fetch_workflow_spec_for_validation(
    api_key: Optional[str],
    workspace_name: str,
    workflow_id: str,
    workflow_version_id: Optional[str] = None,
) -> Optional[dict]:
    """Fetch a workflow spec, returning None on any error."""
    try:
        return get_workflow_specification(
            api_key=api_key,
            workspace_id=workspace_name,
            workflow_id=workflow_id,
            workflow_version_id=workflow_version_id,
        )
    except Exception as error:
        if _logger.isEnabledFor(logging.DEBUG):
            _logger.debug(
                "Could not fetch workflow '%s' for compile-time validation (error type: %s)",
                workflow_id,
                type(error).__name__,
            )
        return None
```