---
name: "upscli_strerror"
section: "3"
platform: "linux"
package: "nut"
version: "2.8.5-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/upscli_strerror"
---

# upscli\_strerror(3)

Return a string describing error condition

## NAME

upscli\_strerror - Return a string describing error condition

## SYNOPSIS

```
        #include <upsclient.h>
        const char *upscli_strerror(UPSCONN_t *ups);
```

## DESCRIPTION

The **upscli\_strerror**() function takes the pointer *ups* to a UPSCONN\_t state structure and returns a string describing the last error which occurred on this connection. The string is valid until the next call to **upscli\_strerror**().

## RETURN VALUE

The **upscli\_strerror**() function returns a description of the error, or an "unknown error" message if the error code is not recognized.

## SEE ALSO

[**upscli\_fd**(3)](/upscli_fd/3.md), [**upscli\_get**(3)](/upscli_get/3.md), [**upscli\_readline**(3)](/upscli_readline/3.md), [**upscli\_sendline**(3)](/upscli_sendline/3.md), [**upscli\_ssl**(3)](/upscli_ssl/3.md), [**upscli\_upserror**(3)](/upscli_upserror/3.md)
