# BaseHomeError

# BaseHomeError


```
sealed class BaseHomeError
```

<br />

Known direct subclasses [HomeError](https://developers.home.google.com/reference/kotlin/com/google/home/HomeError), [MatterError](https://developers.home.google.com/reference/kotlin/com/google/home/MatterError)

|---|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/HomeError` | Representation of an error that happened during an API call. |
| `https://developers.home.google.com/reference/kotlin/com/google/home/MatterError` |   |

*** ** * ** ***

Base class for HomeError and MatterError.

## Summary

| ### Protected constructors |
|---|
| `https://developers.home.google.com/reference/kotlin/com/google/home/BaseHomeError#BaseHomeError(kotlin.Int,kotlin.String,com.google.home.HomeErrorDomain,kotlin.String)( code: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html, domain: https://developers.home.google.com/reference/kotlin/com/google/home/HomeErrorDomain?, reason: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html? )` |

| ### Public properties |
|---|---|
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/BaseHomeError#code()` the error code in HomeException.Codes |
| `open https://developers.home.google.com/reference/kotlin/com/google/home/HomeErrorDomain?` | `https://developers.home.google.com/reference/kotlin/com/google/home/BaseHomeError#domain()` the error domain |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | `https://developers.home.google.com/reference/kotlin/com/google/home/BaseHomeError#message()` the error message |
| `open https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html?` | `https://developers.home.google.com/reference/kotlin/com/google/home/BaseHomeError#reason()` the reason for the error which represents UPPER_SNAKE_CASE string. |

## Protected constructors

### BaseHomeError

```
protected BaseHomeError(
    code: Int,
    message: String,
    domain: HomeErrorDomain? = null,
    reason: String? = null
)
```

| Parameters |
|---|---|
| `code: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | the error code in HomeException.Codes |
| `message: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | the error message |
| `domain: https://developers.home.google.com/reference/kotlin/com/google/home/HomeErrorDomain? = null` | the error domain |
| `reason: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html? = null` | the reason for the error which represents UPPER_SNAKE_CASE string. |

## Public properties

### code

```
open val code: Int
```

the error code in HomeException.Codes

### domain

```
open val domain: HomeErrorDomain?
```

the error domain

### message

```
open val message: String
```

the error message

### reason

```
open val reason: String?
```

the reason for the error which represents UPPER_SNAKE_CASE string.