European Parliament MCP Server API - v1.0.1
    Preparing search index...

    Function isTimeoutError

    • Type guard to check if an error is a TimeoutError

      Parameters

      • error: unknown

        Error to check

      Returns error is TimeoutError

      true if error is a TimeoutError

      try {
      await withTimeout(operation(), 5000);
      } catch (error) {
      if (isTimeoutError(error)) {
      console.error('Operation timed out:', error.timeoutMs);
      }
      }

      0.8.0