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

    Class IntentError

    Error subclass for SAP intent domain operation failures.

    const error = new IntentError({
    message: 'Field not found',
    attempted: 'Fill supplier field',
    fieldName: 'supplier',
    sapDomain: 'procurement',
    });

    MM/SD/FI/PP

    SAP domain intent operations — field fill, button click, navigation, assertion

    Field not found — intent target field does not exist in the current view

    Action failed — SAP business action did not complete successfully

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new IntentError instance.

      Parameters

      • options: IntentErrorOptions

        Intent error construction options including field name and SAP domain context for the failing operation.

      Returns IntentError

      import { IntentError } from '#core/errors/intent-error.js';

      const error = new IntentError({
      message: 'Field selector not resolved: supplier',
      attempted: 'Fill field via vocabulary: supplier',
      fieldName: 'supplier',
      sapDomain: 'procurement',
      suggestions: [
      'Verify the field name exists in vocabulary/domains/procurement.json',
      'Provide a custom selector via options.selectors',
      ],
      });

    Properties

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

    Methods

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

      Returns AIErrorContext & {
          fieldName: string | undefined;
          sapDomain: string | undefined;
      }

      Base AI context extended with field name and SAP domain details.

      const ctx = error.toAIContext();
      // LLM can use ctx.fieldName to look up vocabulary alternatives
      // and ctx.sapDomain to narrow the search scope
    • Serializes this error to a JSON-safe object with intent-specific fields.

      Returns SerializedPramanError & {
          fieldName: string | undefined;
          sapDomain: string | undefined;
      }

      Base serialization extended with fieldName and sapDomain.

      const json = error.toJSON();
      console.log(json.fieldName); // 'supplier'
      console.log(json.sapDomain); // 'procurement'
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());