Creates a new IntentError instance.
Intent error construction options including field name and SAP domain context for the failing operation.
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',
],
});
ReadonlyattemptedReadonlycodeReadonlydetailsReadonlyfieldReadonlyretryableReadonlysapReadonlyseverityReadonlysuggestionsReadonlytimestampReturns AI-agent-friendly context with intent-specific diagnostic fields.
Base AI context extended with field name and SAP domain details.
Serializes this error to a JSON-safe object with intent-specific fields.
Base serialization extended with fieldName and sapDomain.
Error subclass for SAP intent domain operation failures.
Example
Sap Module
MM/SD/FI/PP
Business Context
SAP domain intent operations — field fill, button click, navigation, assertion
Failure Mode
Field not found — intent target field does not exist in the current view
Failure Mode
Action failed — SAP business action did not complete successfully