fix(studio): name the cause when a render request fails - #3424
Merged
Conversation
The render POST's catch took no binding, so the exception was discarded and every transport failure produced one sentence: "Could not reach render server. Use `hyperframes render` from the CLI instead." A dead server, a DNS failure, an aborted request and a server that died mid-render are all indistinguishable under that string — and it is not only a UI message, it is what travels into the feedback report. Three separate field reports carried it verbatim, one of them describing a render that fails every single time. A guaranteed reproduction that tells us nothing is worse than an intermittent one that does. Bind the error and append it. The CLI guidance stays, since it is still the right next step for the user; it just no longer stands alone. Regression test asserts both halves: the cause appears, and the guidance survives. It fails on the unfixed code with `expected 'Could not reach render server. Use `h…' to contain 'Failed to fetch'`.
Merged
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.
What
Studio's render request now reports why it failed instead of collapsing every cause into
one sentence.
Why
useRenderQueue.tswrapped the render POST intry { ... } catch { ... }— no binding, sothe exception was discarded:
A dead server, a DNS failure, an aborted request and a server that died mid-render all
produce that identical string.
It is not only a UI message. It is the value that travels into the feedback report, so
three separate field reports arrived carrying it verbatim — one of them describing a
render that fails every single time. A guaranteed reproduction we cannot read is worse
than an intermittent one we can.
How
Bind the error, append it after the guidance:
The CLI suggestion stays — it is still the right next step for the user — it just no longer
stands alone.
Test plan
New
useRenderQueueTransportError.test.tsxstubsfetchto reject withTypeError("Failed to fetch")and asserts both halves of the contract: the cause appears,and the guidance survives.
Verified it fails on the unfixed code rather than assuming:
With the fix: 1 passed. Full
packages/studiosuite green at 4379 passed / 18 todo.Not covered
diagnosable. The "happens every time" case remains open until a report arrives carrying
the real error.
catchis changed. The!res.okbranch below it already surfacesserver-side detail and is untouched.