Creates a new TimeoutError instance.
Timeout error construction options including the
required timeoutMs and optional elapsed diagnostic fields.
Defaults: code = ERR_TIMEOUT_OPERATION, retryable = true.
import { TimeoutError } from '#core/errors/timeout-error.js';
const error = new TimeoutError({
message: 'Control not found within 10s',
attempted: 'Discover control: sap.m.Button#save',
code: 'ERR_TIMEOUT_CONTROL_DISCOVERY',
timeoutMs: 10000,
elapsed: 10045,
suggestions: ['Increase controlDiscoveryTimeout in config'],
});
ReadonlyattemptedReadonlycodeReadonlydetailsReadonlyelapsedReadonlyretryableReadonlyseverityReadonlysuggestionsReadonlytimeoutReadonlytimestampReturns structured context for AI agents to reason about the timeout failure.
AI-friendly context object with timeout diagnostic fields.
Extends the base AI context with timeoutMs and elapsed so AI agents
can recommend timeout adjustments or identify slow-loading pages.
import { TimeoutError } from '#core/errors/timeout-error.js';
const error = new TimeoutError({
message: 'UI5 stability timed out',
attempted: 'Wait for UI5 stable state',
timeoutMs: 30000,
elapsed: 30500,
});
const context = error.toAIContext();
// context.timeoutMs === 30000, context.elapsed === 30500
Serializes the error to a plain JSON-safe object.
Base serialized fields plus timeoutMs and elapsed.
Error subclass for operation timeout failures.
Remarks
Thrown when UI5 stability waits, control discovery, or generic operations exceed their configured timeout. The
timeoutMsfield always reflects the configured limit, andelapsedcaptures the actual wall-clock time when available.Failure Mode
UI5 stability timeout — UI5 framework did not reach stable state
Failure Mode
Control discovery timeout — target control not found within timeout period
Guarantee
Always includes configured timeoutMs value in error details
Example