Bug
bb pipeline logs <pipeline> always returns:
✗ failed to get step logs: API error 406: Not Acceptable
Root cause
internal/api/client.go sets Accept: application/json on every request:
httpReq.Header.Set("Accept", "application/json")
The Bitbucket pipeline step log endpoint (/repositories/{workspace}/{repo}/pipelines/{uuid}/steps/{uuid}/log) returns text/plain, not JSON. Sending Accept: application/json to a text-only endpoint produces a 406 Not Acceptable response.
Fix
The log endpoint should be called with Accept: text/plain (or no Accept header). The client either needs per-request Accept header overrides, or the logs command needs to bypass the default client and set the header directly.
Steps to reproduce
bb pipeline logs <pipeline-number>
# ✗ failed to get step logs: API error 406: Not Acceptable
Environment
bb CLI (latest)
- Any Bitbucket repository with pipelines enabled
Bug
bb pipeline logs <pipeline>always returns:Root cause
internal/api/client.gosetsAccept: application/jsonon every request:The Bitbucket pipeline step log endpoint (
/repositories/{workspace}/{repo}/pipelines/{uuid}/steps/{uuid}/log) returnstext/plain, not JSON. SendingAccept: application/jsonto a text-only endpoint produces a 406 Not Acceptable response.Fix
The log endpoint should be called with
Accept: text/plain(or no Accept header). The client either needs per-request Accept header overrides, or the logs command needs to bypass the default client and set the header directly.Steps to reproduce
Environment
bbCLI (latest)