ErrorManager 类
命名空间和模块:tencent.cloud.core.errors
简要
class ErrorManager属性
示例
from tencent.cloud.core import errors
from tencent.cloud.core import client
function_client: functions.Client = functions.Client()
def error_handler_callback(
error_manager: errors.ErrorManager,
error_source: client.BaseClient,
error_instance: errors.ActionError,
error_retry_count: int
) -> int:
if not isinstance(error_instance, errors.ActionError):
return errors.ErrorHandlerResult.Ignore
if error_instance.action_id == 'FailedOperation':
return errors.ErrorHandlerResult.Backoff
else:
return errors.ErrorHandlerResult.Throw
function_client.error_manager.add_handler(error_handler_callback)适用于
Tencent Cloud SDK for Python
最后更新于
这有帮助吗?