Repository navigation
fix(ssh): show HTTP status and body of a failed tunnel request - #162
Merged
JanZachmann merged 3 commits intoNov 19, 2026
Merged
Conversation
When the backend rejects the tunnel request without an `internalMsg` JSON body, e.g. a 403 from a gateway, the error now shows the HTTP status and the start of the body instead of "unknown error type". Server text is cut to 200 characters and control characters are replaced, so an HTML error page or escape sequences do not flood or change the terminal. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
The body-read error now names the HTTP status, and a 2xx reply that is not the expected JSON shows the serde error, the status and the body. A 403 without the backend's error format gets a hint: the account may lack access to the device, or a network filter in front of the backend, e.g. one that allows only a VPN, refused the request. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
actix-http 3.22.0 fixes RUSTSEC-2026-0552, RUSTSEC-2026-0553 and RUSTSEC-2026-0554; rustix 1.1.6 fixes RUSTSEC-2026-0486. Signed-off-by: Jan Zachmann 50990105+JanZachmann@users.noreply.github.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ssh set-connectionwith a body that has nointernalMsg, the error now shows the HTTP status and the body, e.g.HTTP 401 Unauthorized: Unauthorized, instead ofunknown error type. An empty body or an emptyinternalMsggives the status.unsupported reply..Reason
A tunnel request to a backend that only allows requests from a VPN failed with
unknown error typewhen the VPN was off. The real reply was a 403 from a gateway with the bodyForbidden, and only a debug build showed it. With status, body and the hint, the user can tell a network or permission problem from a backend error. omnect-cli cannot tell a gateway 403 from a 403 of the backend without a message, so the hint names both causes.Not covered:
cargo auditstill reports bincode (through mbrman 0.6) and chrono (through oauth2 5.0) as unmaintained. oauth2 has no release without chrono; mbrman 0.7 is a separate update.