Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/utils/upload-artifact.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -exuo pipefail
set -euo pipefail

FILENAME=$(basename dist/*.whl)

Expand All @@ -14,11 +14,11 @@ if [[ "$SIGNED_URL" == "null" ]]; then
exit 1
fi

UPLOAD_RESPONSE=$(curl -v -X PUT \
HTTP_CODE=$(curl -w '%{http_code}' -o /dev/null -s -X PUT \
-H "Content-Type: binary/octet-stream" \
--data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1)
--data-binary "@dist/$FILENAME" "$SIGNED_URL")

if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then
if [[ "$HTTP_CODE" == "200" ]]; then
echo -e "\033[32mUploaded build to Stainless storage.\033[0m"
echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/anthropic-python/$SHA/$FILENAME'\033[0m"
else
Expand Down
4 changes: 2 additions & 2 deletions src/anthropic/lib/tools/_beta_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _generate_tool_call_response(self) -> BetaMessageParam | None:
{
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": repr(exc),
"content": f"Error: Tool '{tool_use.name}' execution failed. Check logs for details.",
"is_error": True,
}
)
Expand Down Expand Up @@ -359,7 +359,7 @@ async def _generate_tool_call_response(self) -> BetaMessageParam | None:
{
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": repr(exc),
"content": f"Error: Tool '{tool_use.name}' execution failed. Check logs for details.",
"is_error": True,
}
)
Expand Down