> 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/serverless-functions/exceptions/invoke-error.md).

# InvokeError 异常

## 简要

该异常指示被调用无服务器云函数在运行时出现错误所导致的调用失败，这通常是由于无服务器云函数所运行的代码存在异常。

```python
class InvokeError(errors.ClientError)
```

继承：`tencent.cloud.core.errors.ClientError` 类

## 构造

该异常类仅支持构造异常类实例后使用，其构造实例方法签名如下：

```python
def __init__(self,
    error_message: str,
    request_id: str
)
```

构造实例方法参数和参数描述如下：

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

## 属性

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

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

## 适用于

#### Tencent Cloud SDK for Python

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