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

    Class FLPError

    Error subclass for SAP Fiori Launchpad (FLP) operation failures.

    const error = new FLPError({
    message: 'FLP shell not available',
    attempted: 'Get lock entries via SM12_SRV',
    flpService: 'SM12_SRV',
    });

    FLP

    Requires FLP shell loaded in browser

    Shell not found — FLP shell header not present in the DOM

    Permission denied — user lacks authorization for the requested FLP operation

    API unavailable — FLP OData service endpoint unreachable

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new FLPError instance.

      Parameters

      • options: FLPErrorOptions

        FLP error construction options including service context and optional username for the failing operation.

      Returns FLPError

      import { FLPError } from '#core/errors/flp-error.js';

      const error = new FLPError({
      message: 'FLP shell not found',
      attempted: 'Navigate to Sales Order tile',
      flpService: 'UI2/INTEROP',
      username: 'TESTUSER01',
      });

    Properties

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

    Methods

    • Returns AI-agent-friendly context with FLP-specific diagnostic fields.

      Returns AIErrorContext & {
          flpService: string | undefined;
          username: string | undefined;
      }

      Base AI context extended with FLP service and user details.

      const ctx = error.toAIContext();
      // LLM can use ctx.flpService to suggest corrective navigation
      // and ctx.username to verify authorization scope
    • Serializes this error to a JSON-safe object with FLP-specific fields.

      Returns SerializedPramanError & {
          flpService: string | undefined;
          username: string | undefined;
      }

      Base serialization extended with flpService and username.

      const json = error.toJSON();
      console.log(json.flpService); // 'UI2/INTEROP'
      console.log(json.username); // 'TESTUSER01'
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());