Body already consumed error on logConfig.get and device.getPosture
Opened by swampadmin · 2/6/2025
Description
Several model methods fail with "Body already consumed" error when executed:
@john/tailscale-log-config→getmethod (bothlogType: configurationandlogType: network)@john/tailscale-device→getPosturemethod
Steps to Reproduce
# Log config - fails
swamp model method run my-log-config get --input '{"logType": "configuration"}' --json
# Output: {"error": "Body already consumed"}
# Device posture - fails
swamp model method run my-devices getPosture --input '{"deviceId": "7548945651797101"}' --json
# Output: {"error": "Body already consumed"}Both fail identically via workflow steps and direct CLI invocation. Other methods on the same models work fine (e.g., device.get, device.getRoutes, device.list).
Expected Behavior
The methods should return the API response data.
Environment
- swamp version: 20260227.225234.0-sha.2b2b28be
- Extension: @john/tailscale (version 2026.02.28.2)
- OS: macOS (Darwin 22.6.0)
Summary
This appears to be a bug in the HTTP response handling within the extension model runtime. The Tailscale API responses for these endpoints are likely being read/consumed before the model method tries to parse them. The fix would involve investigating the response body handling in the model execution pipeline for these specific methods — possibly they return a different content type or response structure that triggers premature body consumption.
Closed
No activity in this phase yet.
Sign in to post a ripple.