You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the following code, that tries to attach to a pod running in the cluster:
let pods = Api::<Pod>::namespaced(..);letmut attachment = pods
.attach(
..,&AttachParams::default().container(debug_container_name).stdout(true),).await.context(AttachSnafu)?;
We return a... less than helpful error message about upgrading the websocket:
An unrecoverable error occured: debug command error
Caused by these errors (recent errors listed first):
1: Attach
2: failed to upgrade to a WebSocket connection
3: failed to switch protocol
After digging into the request, the server's response actually contains the following much more helpful error:
rpc error: code = InvalidArgument desc = tty and stderr cannot both be true
Possible solution
UpgradeConnectionError::ProtocolSwitch should also contain (and report) the response body.
Additional context
This is from a slightly old version of kube, but looking through the changelogs I don't see a mention of this changing since.
Environment
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
Current and expected behavior
For the following code, that tries to attach to a pod running in the cluster:
We return a... less than helpful error message about upgrading the websocket:
After digging into the request, the server's response actually contains the following much more helpful error:
Possible solution
UpgradeConnectionError::ProtocolSwitch
should also contain (and report) the response body.Additional context
This is from a slightly old version of kube, but looking through the changelogs I don't see a mention of this changing since.
Environment
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.3
Configuration and features
Affected crates
kube-client
Would you like to work on fixing this bug?
None
The text was updated successfully, but these errors were encountered: