---
sidebar_position: 8
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get last error
Gets information about the last error in the connection
`Function GetLastError(Val Connection) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Connection | - | Arbitrary | ✔ | Connection, see. CreateConnection |
Returns: Map Of KeyAndValue, Undefined - Error information or undefined if there is no error
:::caution
**NOCLI:** this method is not available in CLI version
:::
```bsl title="1C:Enterprise/OneScript code example"
```