Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Class TimeoutError

    Error subclass for operation timeout failures.

    Thrown when UI5 stability waits, control discovery, or generic operations exceed their configured timeout. The timeoutMs field always reflects the configured limit, and elapsed captures the actual wall-clock time when available.

    UI5 stability timeout — UI5 framework did not reach stable state

    Control discovery timeout — target control not found within timeout period

    Always includes configured timeoutMs value in error details

    const error = new TimeoutError({
    message: 'UI5 stability check timed out after 30s',
    attempted: 'Wait for UI5 to stabilize',
    timeoutMs: 30000,
    elapsed: 30123,
    });

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new TimeoutError instance.

      Parameters

      • options: TimeoutErrorOptions

        Timeout error construction options including the required timeoutMs and optional elapsed diagnostic fields. Defaults: code = ERR_TIMEOUT_OPERATION, retryable = true.

      Returns TimeoutError

      import { TimeoutError } from '#core/errors/timeout-error.js';

      const error = new TimeoutError({
      message: 'Control not found within 10s',
      attempted: 'Discover control: sap.m.Button#save',
      code: 'ERR_TIMEOUT_CONTROL_DISCOVERY',
      timeoutMs: 10000,
      elapsed: 10045,
      suggestions: ['Increase controlDiscoveryTimeout in config'],
      });

    Properties

    attempted: string
    code: ErrorCode
    details: Readonly<Record<string, unknown>>
    elapsed: number | undefined
    retryable: boolean
    severity: "error" | "info" | "warning"
    suggestions: readonly string[]
    timeoutMs: number
    timestamp: string

    Methods

    • Returns structured context for AI agents to reason about the timeout failure.

      Returns AIErrorContext & { elapsed: number | undefined; timeoutMs: number }

      AI-friendly context object with timeout diagnostic fields.

      Extends the base AI context with timeoutMs and elapsed so AI agents can recommend timeout adjustments or identify slow-loading pages.

      import { TimeoutError } from '#core/errors/timeout-error.js';

      const error = new TimeoutError({
      message: 'UI5 stability timed out',
      attempted: 'Wait for UI5 stable state',
      timeoutMs: 30000,
      elapsed: 30500,
      });
      const context = error.toAIContext();
      // context.timeoutMs === 30000, context.elapsed === 30500
    • Serializes the error to a plain JSON-safe object.

      Returns SerializedPramanError & { elapsed: number | undefined; timeoutMs: number }

      Base serialized fields plus timeoutMs and elapsed.

      import { TimeoutError } from '#core/errors/timeout-error.js';

      const error = new TimeoutError({
      message: 'Timed out',
      attempted: 'Wait for stability',
      timeoutMs: 5000,
      });
      const json = error.toJSON();
      // json.timeoutMs === 5000
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());