Function: isResourceExhaustedError()
isResourceExhaustedError(
errorMessage):boolean
Defined in: packages/core/src/utils/retry.ts:70
Whether an error message reads as resource exhaustion (open files, memory, process spawn). Such an error is better not retried at once: the system needs time to recover.
Parameters
errorMessage
string
Returns
boolean
Example
try {
await spawnProcess();
} catch (error) {
if (isResourceExhaustedError(error.message)) {
return { success: false, error: 'System resources exhausted, try again later' };
}
throw error;
}