本页还没有译文
本页 8 段还没译成日本語,下面显示的是英文原文。AI_InvalidToolApprovalSignatureError
还没翻译译自英文(ai-sdk.dev)本页 8 段都还没译
This error occurs when experimental_toolApprovalSecret is configured and a tool approval replayed from the message history has a missing or invalid HMAC signature. The server rejects the approval before the tool executes.
Common causes:
- The approval was fabricated by the client (no signature present)
- The tool arguments were modified after the approval was signed
- The server secret changed between issuance and verification (e.g. after key rotation without overlap)
Properties
approvalId: The approval ID that failed verificationtoolCallId: The tool call ID the approval was for
Checking for this Error
You can check if an error is an instance of AI_InvalidToolApprovalSignatureError using:
import { InvalidToolApprovalSignatureError } from 'ai';
if (InvalidToolApprovalSignatureError.isInstance(error)) {
// Handle the error
}AI 翻译查看英文原文