# A2uiClientErrorMessage

Artifact: [androidx.a2ui:a2ui-model](https://developer.android.com/jetpack/androidx/releases/a2ui) [View Source](https://cs.android.com/search?q=file:androidx/a2ui/model/protocol/A2uiClientToServerMessage.kt+class:androidx.a2ui.model.protocol.A2uiClientErrorMessage) Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

*** ** * ** ***


```
class A2uiClientErrorMessage : A2uiClientToServerMessage
```

<br />

*** ** * ** ***

Represents a client-side execution or validation error reported to the server.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#A2uiClientErrorMessage(kotlin.String,kotlin.String,kotlin.String,kotlin.collections.Map)( code: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, surfaceId: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, message: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, context: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> )` |

| ### Public functions |
|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#hashCode()()` |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#toString()()` |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#code()` An error category identifier (such as "VALIDATION_FAILED" or "RUNTIME_ERROR"). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?>` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#context()` A map containing custom properties and error context (such as the target path). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#message()` A human-readable description of the error. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/a2ui/model/protocol/A2uiClientErrorMessage#surfaceId()` The unique ID of the surface where the error occurred. |

## Public constructors

### A2uiClientErrorMessage

```
A2uiClientErrorMessage(
    code: String,
    surfaceId: String,
    message: String,
    context: Map<String, Any?> = emptyMap()
)
```

## Public functions

### equals

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

```
open fun hashCode(): Int
```

### toString

```
open fun toString(): String
```

## Public properties

### code

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val code: String
```

An error category identifier (such as "VALIDATION_FAILED" or "RUNTIME_ERROR").

### context

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val context: Map<String, Any?>
```

A map containing custom properties and error context (such as the target path). For validation errors ("VALIDATION_FAILED"), this map must contain exactly the "path" key (whose value must be a non-null String) and absolutely nothing else. For other errors, it is open-ended.

### message

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val message: String
```

A human-readable description of the error.

### surfaceId

Added in [1.0.0-alpha02](https://developer.android.com/jetpack/androidx/releases/a2ui#1.0.0-alpha02)

```
val surfaceId: String
```

The unique ID of the surface where the error occurred.