[**@s4ai/core Documentation v0.3.23**](../../../README.md)

***

[@s4ai/core Documentation](../../../modules.md) / [monitoring/error-awareness-system](../README.md) / ErrorAwarenessSystem

# Class: ErrorAwarenessSystem

Defined in: monitoring/error-awareness-system.js:7

Error Awareness System for S4Ai Self-Healing
Makes S4Ai aware of all system errors and enables autonomous healing

## Constructors

### Constructor

> **new ErrorAwarenessSystem**(): `ErrorAwarenessSystem`

Defined in: monitoring/error-awareness-system.js:8

#### Returns

`ErrorAwarenessSystem`

## Properties

### errors

> **errors**: `any`[]

Defined in: monitoring/error-awareness-system.js:9

***

### healingAttempts

> **healingAttempts**: `any`[]

Defined in: monitoring/error-awareness-system.js:10

***

### initialized

> **initialized**: `boolean`

Defined in: monitoring/error-awareness-system.js:11

## Methods

### attemptSelfHealing()

> **attemptSelfHealing**(`error`): `Promise`\<`void`\>

Defined in: monitoring/error-awareness-system.js:78

#### Parameters

##### error

`any`

#### Returns

`Promise`\<`void`\>

***

### captureError()

> **captureError**(`error`): `void`

Defined in: monitoring/error-awareness-system.js:63

#### Parameters

##### error

`any`

#### Returns

`void`

***

### determineHealingStrategy()

> **determineHealingStrategy**(`error`): \{ `action`: () => `Promise`\<`void`\>; `name`: `string`; \} \| `null`

Defined in: monitoring/error-awareness-system.js:108

#### Parameters

##### error

`any`

#### Returns

\{ `action`: () => `Promise`\<`void`\>; `name`: `string`; \} \| `null`

***

### getStatus()

> **getStatus**(): `object`

Defined in: monitoring/error-awareness-system.js:166

#### Returns

`object`

##### healingSuccessRate

> **healingSuccessRate**: `string`

##### initialized

> **initialized**: `boolean`

##### isAware

> **isAware**: `boolean`

##### recentErrors

> **recentErrors**: `any`[]

##### recentHealing

> **recentHealing**: `any`[]

##### successfulHealing

> **successfulHealing**: `number`

##### totalErrors

> **totalErrors**: `number`

##### totalHealingAttempts

> **totalHealingAttempts**: `number`

***

### initialize()

> **initialize**(): `Promise`\<`void`\>

Defined in: monitoring/error-awareness-system.js:14

#### Returns

`Promise`\<`void`\>

***

### setupGlobalErrorHandlers()

> **setupGlobalErrorHandlers**(): `void`

Defined in: monitoring/error-awareness-system.js:32

#### Returns

`void`

***

### setupProcessErrorHandlers()

> **setupProcessErrorHandlers**(): `void`

Defined in: monitoring/error-awareness-system.js:53

#### Returns

`void`

***

### shutdown()

> **shutdown**(): `void`

Defined in: monitoring/error-awareness-system.js:186

#### Returns

`void`

***

### startErrorMonitoring()

> **startErrorMonitoring**(): `void`

Defined in: monitoring/error-awareness-system.js:156

#### Returns

`void`
