Skip to main content

Error Reference

Praman provides 14 typed error classes with 56 machine-readable error codes. Every error includes the attempted operation, a retryable flag, and actionable recovery suggestions.

Error Hierarchy​

All errors extend PramanError, which extends Error:

Error
└── PramanError
├── AIError (9 codes)
├── AuthError (4 codes)
├── BridgeError (5 codes)
├── ConfigError (3 codes)
├── ControlError (8 codes)
├── FLPError (5 codes)
├── IntentError (4 codes)
├── NavigationError (3 codes)
├── ODataError (3 codes)
├── PluginError (3 codes)
├── SelectorError (3 codes)
├── TimeoutError (3 codes)
└── VocabularyError (4 codes)

Error Codes​

Config Errors​

CodeDescriptionRetryable
ERR_CONFIG_INVALIDZod schema validation failedNo
ERR_CONFIG_NOT_FOUNDConfig file not found at expected pathNo
ERR_CONFIG_PARSEConfig file could not be parsed (syntax error)No

Bridge Errors​

CodeDescriptionRetryable
ERR_BRIDGE_TIMEOUTBridge injection exceeded timeoutYes
ERR_BRIDGE_INJECTIONBridge script failed to inject into pageYes
ERR_BRIDGE_NOT_READYBridge not ready (UI5 not loaded)Yes
ERR_BRIDGE_VERSIONUI5 version mismatch or unsupportedNo
ERR_BRIDGE_EXECUTIONBridge script execution failedYes

Control Errors​

CodeDescriptionRetryable
ERR_CONTROL_NOT_FOUNDControl not found with given selectorYes
ERR_CONTROL_NOT_VISIBLEControl exists but is not visibleYes
ERR_CONTROL_NOT_ENABLEDControl is visible but disabledNo
ERR_CONTROL_NOT_INTERACTABLEControl cannot receive interactionsNo
ERR_CONTROL_PROPERTYProperty read/write failedNo
ERR_CONTROL_AGGREGATIONAggregation access failedNo
ERR_CONTROL_METHODMethod invocation failed (possibly blacklisted)No
ERR_CONTROL_INTERACTION_FAILEDClick/type/select operation failedYes

Auth Errors​

CodeDescriptionRetryable
ERR_AUTH_FAILEDAuthentication failed (wrong credentials)No
ERR_AUTH_TIMEOUTLogin page did not respond in timeYes
ERR_AUTH_SESSION_EXPIREDSession expired (default: 30 min)Yes
ERR_AUTH_STRATEGY_INVALIDUnknown or misconfigured auth strategyNo
CodeDescriptionRetryable
ERR_NAV_TILE_NOT_FOUNDFLP tile not found by titleNo
ERR_NAV_ROUTE_FAILEDHash navigation did not resolveYes
ERR_NAV_TIMEOUTNavigation did not complete in timeYes

OData Errors​

CodeDescriptionRetryable
ERR_ODATA_REQUEST_FAILEDHTTP request to OData service failedYes
ERR_ODATA_PARSEOData response could not be parsedNo
ERR_ODATA_CSRFCSRF token fetch or validation failedYes

Selector Errors​

CodeDescriptionRetryable
ERR_SELECTOR_INVALIDSelector object is malformedNo
ERR_SELECTOR_AMBIGUOUSMultiple controls match the selectorNo
ERR_SELECTOR_PARSESelector string could not be parsedNo

Timeout Errors​

CodeDescriptionRetryable
ERR_TIMEOUT_UI5_STABLEUI5 did not reach stable stateYes
ERR_TIMEOUT_CONTROL_DISCOVERYControl discovery exceeded timeoutYes
ERR_TIMEOUT_OPERATIONGeneric operation timeoutYes

AI Errors​

CodeDescriptionRetryable
ERR_AI_PROVIDER_UNAVAILABLELLM provider not reachableYes
ERR_AI_RESPONSE_INVALIDLLM returned invalid response formatYes
ERR_AI_TOKEN_LIMITPrompt exceeded token limitNo
ERR_AI_RATE_LIMITEDProvider rate limit hitYes
ERR_AI_NOT_CONFIGUREDAI provider not configuredNo
ERR_AI_LLM_CALL_FAILEDLLM API call failedYes
ERR_AI_RESPONSE_PARSE_FAILEDCould not parse LLM responseYes
ERR_AI_CONTEXT_BUILD_FAILEDPage context build failedYes
ERR_AI_STEP_INTERPRET_FAILEDStep interpretation failedNo

Plugin Errors​

CodeDescriptionRetryable
ERR_PLUGIN_LOADPlugin module could not be loadedNo
ERR_PLUGIN_INITPlugin initialization failedYes
ERR_PLUGIN_INCOMPATIBLEPlugin version incompatibleNo

Vocabulary Errors​

CodeDescriptionRetryable
ERR_VOCAB_TERM_NOT_FOUNDBusiness term not in vocabularyNo
ERR_VOCAB_DOMAIN_LOAD_FAILEDDomain JSON failed to loadYes
ERR_VOCAB_JSON_INVALIDDomain vocabulary JSON malformedNo
ERR_VOCAB_AMBIGUOUS_MATCHMultiple terms match with similar scoreNo

Intent Errors​

CodeDescriptionRetryable
ERR_INTENT_FIELD_NOT_FOUNDForm field not found for intentNo
ERR_INTENT_ACTION_FAILEDIntent action could not be completedYes
ERR_INTENT_NAVIGATION_FAILEDIntent navigation to app failedYes
ERR_INTENT_VALIDATION_FAILEDIntent input validation failedNo

FLP Errors​

CodeDescriptionRetryable
ERR_FLP_SHELL_NOT_FOUNDFLP shell container not foundYes
ERR_FLP_PERMISSION_DENIEDInsufficient FLP permissionsNo
ERR_FLP_API_UNAVAILABLEFLP UShell API not availableYes
ERR_FLP_INVALID_USERFLP user context invalidNo
ERR_FLP_OPERATION_TIMEOUTFLP operation timed outYes

Using Errors in Tests​

Catch and Inspect​

import { test } from 'playwright-praman';
import { ControlError } from 'playwright-praman';

test('handle control not found', async ({ ui5 }) => {
try {
await ui5.control({ id: 'nonExistent' });
} catch (error) {
if (error instanceof ControlError) {
console.log(error.code); // 'ERR_CONTROL_NOT_FOUND'
console.log(error.retryable); // true
console.log(error.suggestions); // ['Verify the control ID...', ...]
console.log(error.toUserMessage()); // Human-readable
console.log(error.toAIContext()); // Machine-readable for AI agents
}
}
});

Error Properties​

Every PramanError includes:

PropertyTypeDescription
codeErrorCodeMachine-readable code (e.g., 'ERR_CONTROL_NOT_FOUND')
messagestringHuman-readable description
attemptedstringWhat operation was attempted
retryablebooleanWhether the operation can be retried
suggestionsstring[]2-4 actionable recovery steps
detailsRecordAdditional context (selector, timeout, etc.)
timestampstringISO-8601 timestamp

Serialization​

// For humans
error.toUserMessage();
// "Control not found: #saveBtn. Try: Verify the control ID exists..."

// For logging (JSON)
error.toJSON();
// { code, message, attempted, retryable, suggestions, details, timestamp }

// For AI agents
error.toAIContext();
// Structured context optimized for LLM consumption