fix(production): camera panel reports the real failure reason - #14
Merged
Conversation
The panel blamed the printer for every failure: "The printer may be
offline, or its camera disabled in BambuBuddy." An <img> onError reports
only that something went wrong - never a status, never a body - so one
guess had to cover a missing route, an expired session, an unconfigured
BambuBuddy and a genuinely offline printer.
Those need entirely different fixes, and the guess pointed at the wrong
one: it sent people to check the printer when the actual answer was that
the backend had not been redeployed with the camera route yet.
On failure the same URL is now re-requested with fetch, which does expose
the status and the {detail} the proxy passes through from Tensor-Core, so
the panel reports the real reason. A 404 says the endpoint is missing
from this deployment; a success says the stream dropped and to retry.
That probe aborts as soon as the status is known. It is asking a
question, not watching a feed, and a successful response is an endless
MJPEG body - left open it would start a second stream from the printer
that nobody ever reads.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
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.



The panel blamed the printer for every failure — "The printer may be offline, or its camera disabled in BambuBuddy."
An
<img>onErrorreports only that something went wrong, never a status or body, so one guess had to cover a missing route, an expired session, an unconfigured BambuBuddy, and a genuinely offline printer. Those need entirely different fixes, and the guess pointed at the wrong one: it sent people to check the printer when the real answer was that the backend had not been redeployed with the camera route.On failure the same URL is now re-requested with
fetch, which does expose the status and the{detail}the proxy passes through from Tensor-Core. A 404 says the endpoint is missing from this deployment; a success says the stream dropped and to retry.The probe aborts as soon as the status is known — it is asking a question, not watching a feed, and a successful response is an endless MJPEG body that would otherwise start a second stream from the printer nobody reads.
🤖 Generated with Claude Code