

# AgentCore 付款疑难解答
<a name="payments-troubleshooting"></a>

本节提供使用 AWS Amazon Bedrock AgentCore 付款时常见错误的解决方案。

## 验证错误
<a name="payments-troubleshooting-validation"></a>

创建或更新付款资源时，该服务会返回`ValidationException`。下表列出了常见的验证错误及其解决方法。


| 错误消息 | 解决方案 | 
| --- | --- | 
|  `roleArn must contain a valid account ID`  | `roleArn`必须是有效的 IAM 角色 ARN，账户编号为 12 位。验证格式：`arn:aws:iam::<accountId>:role/<roleName>`。 | 
|  `roleArn must belong to your account`  | 中的账户 ID `roleArn` 必须与来电者的账户相匹配。 Cross-account 不支持角色。 | 
|  `Invalid role ARN: {roleArn}`  | `roleArn`无法解析。验证 ARN 格式。 | 
|  `credentialProviderConfigurations list cannot be empty`  | 创建或更新支付连接器时，请至少提供一个凭证提供商配置。 | 
|  `credentialProviderArn is required but not found in the request`  | 每个凭证提供商配置都必须包含。`credentialProviderArn`首先使用创建[凭证提供程序创建一个](resource-providers.md)。 | 
|  `Connector type '{type}' does not match the provided credentialProviderConfiguration`  | 凭证提供程序配置变体必须与连接器类型相匹配。例如，`CoinbaseCDP`连接器需要`coinbaseCDP`配置，而不是`stripePrivy`。 | 

还强制执行字段命名限制：
+ 付款经理姓名必须以字母开头，并且仅包含字母数字字符（最多 48 个字符）。
+ 支付连接器名称遵循相同的规则，但也允许使用下划线。
+ 描述允许使用字母数字字符和空格（最多 4096 个字符）。

## 权限错误
<a name="payments-troubleshooting-permissions"></a>


| 错误消息 | 解决方案 | 
| --- | --- | 
|  `Access denied due to account security restrictions. Contact AWS Support for assistance.`  | 您的账户已被限制。请联系 S AWS upport 以解决问题。 | 
|  `Access denied for {CREATE\|UPDATE} due to account security restrictions. Contact AWS Support for assistance.`  | 您的账户处于访问受限状态。允许读取和列出操作，但在限制得到解决之前，创建和更新操作将受到限制。 | 
| IAM Sigv4 授权失败 | 确保主叫方具有适当的`bedrock-agentcore:`权限。该服务使用带有签名名称的 Sigv4 `bedrock-agentcore` 签名。 | 
| PassRole 失败 | 提供时`roleArn`，调用者必须拥有该角色的`iam:PassRole`权限。角色的信任策略必须允许`bedrock-agentcore.amazonaws.com`作为服务主体。 | 

## 未找到资源错误
<a name="payments-troubleshooting-not-found"></a>


| 错误消息 | 解决方案 | 
| --- | --- | 
|  `Payment manager not found: {managerId}`  | 指定的付款管理器不存在。致电验证身份`ListPaymentManagers`。 | 
|  `Payment connector not found: connectorId={connectorId}, managerId={managerId}`  | 指定的连接器在给定的管理器下不存在。使用验证两个 ID `ListPaymentConnectors`。 | 
| 期间未找到资源 `CreatePaymentConnector`  | 父付款管理器不存在。首先创建付款管理器。 | 

## 冲突错误
<a name="payments-troubleshooting-conflict"></a>

`ConflictException`当两个请求同时修改同一个资源时，或者在创建已存在的资源时，该服务会返回。重试请求。创建和更新操作`clientToken`支持安全重试。

## 服务配额错误
<a name="payments-troubleshooting-quota"></a>

`"{limitType} limit exceeded for account {accountId}"`当您达到账户的付款管理器或连接器的最大数量时，该服务就会返回。删除未使用的资源或联系 S AWS upport 申请提高限制。

## 节流错误
<a name="payments-troubleshooting-throttling"></a>

`"Rate exceeded"`当请求速率超过允许的限制时，服务就会返回。在重试逻辑中使用抖动实现指数退避。如果您一直达到极限，请联系 Supp AWS ort。

## 付款处理错误
<a name="payments-troubleshooting-processing"></a>

如果外部支付提供商拒绝签名请求，则该服务将返回`AccessDeniedException`或`ValidationException`。下表列出了常见错误及其解决方法。


| 错误消息 | 解决方案 | 
| --- | --- | 
|  `Delegated signing grant is not active for the end user wallet. Please redirect end user to the WalletHub to grant the permissions.`  | 您尚未授予允许您的代理人代表您签署交易的委托权限，或者您之前已撤销该权限。要解决这个问题，请执行以下操作：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/bedrock-agentcore/latest/devguide/payments-troubleshooting.html)<br />有关处理委托拨款流程的前端实现的更多信息，请参阅网站上的 [Coinbase AgentCore 模板](https://github.com/coinbase/cdp-agentcore-template)。 GitHub 有关为钱包注资的更多信息，请参阅[为钱包注资](payments-how-it-works.md#payments-how-it-works-funding-wallet)。 | 
|  `Delegated signing is not enabled for your Coinbase project. Please enable delegated signing in your Coinbase project policies.`  | 您的 Coinbase 开发者平台项目未配置委托签名。要解决这个问题，请执行以下操作：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/bedrock-agentcore/latest/devguide/payments-troubleshooting.html)<br />您必须先完成此步骤，您的代理才能代表用户签署交易。 | 
|  `Privy credentials are invalid. Please verify the credential configuration.`  | 您的凭证提供商的 Privy 钱包授权密钥无效或已过期。要解决这个问题，请执行以下操作：[See the AWS documentation website for more details](http://docs.aws.amazon.com/zh_cn/bedrock-agentcore/latest/devguide/payments-troubleshooting.html)<br />有关凭据配置的更多信息，请参阅网站上的 [Privy AgentCore SDK](https://github.com/privy-io/aws-agentcore-sdk)。 GitHub  | 

## 服务器错误数
<a name="payments-troubleshooting-server"></a>

服务因内部错误`"Something went wrong in processing your request"`而返回。稍等片刻后重试请求。如果错误仍然存在，请使用`x-amzn-requestid`响应标头中的请求 ID 与 Support 联系 AWS 。