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

    Class AuthError

    Error subclass for authentication failures.

    BC-SEC

    SAP authentication lifecycle — login, session refresh, SSO token handling

    const error = new AuthError({
    message: 'Auth failed',
    attempted: 'Login to SAP',
    strategy: 'btp-saml',
    });

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a new AuthError instance.

      Parameters

      • options: AuthErrorOptions

        Auth error construction options including strategy and login URL.

      Returns AuthError

      import { AuthError } from '#core/errors/auth-error.js';

      const error = new AuthError({
      message: 'SAML authentication failed',
      attempted: 'Login to SAP BTP',
      strategy: 'btp-saml',
      loginUrl: 'https://accounts.sap.com/login',
      });

    Properties

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

    Methods

    • Returns structured context for AI agents with authentication diagnostics.

      Returns AIErrorContext & { loginUrl: string | undefined; strategy: string | undefined }

      Base AI context plus strategy and loginUrl fields to help diagnose authentication configuration issues.

      const context = error.toAIContext();
      // context.strategy, context.loginUrl available
      // Send to LLM for auth troubleshooting suggestions
    • Serializes the error to a JSON-safe object with authentication fields.

      Returns SerializedPramanError & {
          loginUrl: string | undefined;
          strategy: string | undefined;
      }

      Base fields plus strategy and loginUrl.

      const json = error.toJSON();
      // json.strategy === 'btp-saml'
      // json.loginUrl === 'https://accounts.sap.com/login'
    • Formats the error for human-readable console output.

      Returns string

      Multi-line formatted string with all diagnostic sections.

      console.error(error.toUserMessage());