Repository navigation
fix: stop discarding failed bin saves silently, log 422 detail - #188
Merged
Merged
Conversation
A failing autosave was invisible from both ends.
Client: the bin page dropped the promise with .catch(() => {}) before
useDebouncedSave could see it, and the hook swallowed anything that did
reach it with an empty catch. A rejected save left the editor showing the
same green tick as a successful one, so work looked saved when it was not.
The hook now exposes the error, the bin page awaits the request instead of
dropping it, and a failure is shown next to the breadcrumb with a warning
that unsaved edits will be lost on leaving.
Server: a 422 recorded nothing but a status code in the access log, so a
client sending a bad payload could not be diagnosed after the fact. Log the
field path and error type on validation failure, never the value, since
payloads carry user data.
The other two useDebouncedSave callers already awaited correctly and are
unaffected.
Re: #186
Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
The install step re-downloaded chromium every run and shelled out to apt via --with-deps, which stalled for 13 minutes and consumed the whole 15 minute job budget before any test ran. The job reported as cancelled, which reads like a test failure rather than an install hang. Cache the browsers, skip apt on a cache hit, and bound the step at 5 minutes so a stall fails honestly. Also cache pip: the backend install pulls torch and the full CUDA wheel set on every run. Signed-off-by: Jason Madigan <jason@jasonmadigan.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.
Re #186.
Adds additional logging: a 422 now records the failing field and error type rather than just a status code. Never the value.
Also stops the bin editor discarding failed saves. The page dropped the promise and the hook swallowed the rejection, so a failed autosave showed the same green tick as a success.
Does not identify the 422 trigger.