fix: Handle dict objects in write_resource endpoint (#415)

Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Paul Hernandez <phernandez@users.noreply.github.com>
This commit is contained in:
Paul Hernandez
2025-11-10 16:30:27 -06:00
committed by GitHub
parent 0d4ad7bbf0
commit 4614fd09d5
2 changed files with 22 additions and 1 deletions
+8 -1
View File
@@ -110,7 +110,14 @@ async def canvas(
# Write the file using the resource API
logger.info(f"Creating canvas file: {file_path} in project {project}")
response = await call_put(client, f"{project_url}/resource/{file_path}", json=canvas_json)
# Send canvas_json as content string, not as json parameter
# The resource endpoint expects Body() string content, not JSON-encoded data
response = await call_put(
client,
f"{project_url}/resource/{file_path}",
content=canvas_json,
headers={"Content-Type": "text/plain"},
)
# Parse response
result = response.json()