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',}); Copy
const error = new FLPError({ message: 'FLP shell not available', attempted: 'Get lock entries via SM12_SRV', flpService: 'SM12_SRV',});
Readonly
Returns structured context for AI agents to reason about the error.
AI-friendly context object.
Same as toJSON() but omits stack and name — AI agents don't need stack traces, and the error type is conveyed by code.
toJSON()
stack
name
code
const context = error.toAIContext();// Send to LLM for self-healing analysis Copy
const context = error.toAIContext();// Send to LLM for self-healing analysis
Serializes the error to a plain JSON-safe object.
Structured representation with all diagnostic fields.
const json = error.toJSON();logger.debug(JSON.stringify(json, null, 2)); Copy
const json = error.toJSON();logger.debug(JSON.stringify(json, null, 2));
Formats the error for human-readable console output.
Multi-line formatted string with all diagnostic sections.
console.error(error.toUserMessage()); Copy
console.error(error.toUserMessage());
Error subclass for SAP Fiori Launchpad (FLP) operation failures.
Example