# error

> Error.

[Back to constructors index](/API_docs/constructors/index.html)



Error.

### Attributes:

| Name     |    Type       | Required | Description |
|----------|---------------|----------|-------------|
|code|[int](/API_docs/types/int.html) | Yes|Error code|
|text|[string](/API_docs/types/string.html) | Yes|Message|



### Type: [Error](/API_docs/types/Error.html)


### Example:

```
$error = ['_' => 'error', 'code' => int, 'text' => 'string'];
```
