> For the complete documentation index, see [llms.txt](https://smallso.gitbook.io/tencent-cloud-sdk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smallso.gitbook.io/tencent-cloud-sdk/python-docs/other-products/exceptions/error.md).

# Error 异常

## 简要

该异常类型为 Tencent Cloud SDK for Python 所有异常的基类，任何 Tencent Cloud SDK for Python 所主动引发的异常类型均基于该异常类型。

```python
class Error(Exception)
```

继承：`Exception` 类

{% hint style="danger" %}
请注意，直接捕获该异常不是一个好主意。相反，您应该捕获您预期之内的异常并处理它。
{% endhint %}

## 属性

该异常类包含的可公开访问属性和属性描述如下：

| 属性             | 类型  | 描述                                |
| -------------- | --- | --------------------------------- |
| error\_message | str | 错误描述。                             |
| request\_id    | str | 出错的无服务器云函数调用唯一标识符（Request ID）字符串。 |

## 适用于

#### Tencent Cloud SDK for Python

产品软件包：tencent-cloud-sdk-core >= 0.1.1
