SP-1173: say what to do when CUI marking cannot be resolved - #416
Open
Dennis Woditsch (dwoditsch) wants to merge 1 commit into
Open
Conversation
The failure surfaced as "Problem fetching cui pdf cover", which named neither the cause nor the consequence. All three CUI failures now share one message that says marking could not be resolved and no file was written, with the specifics kept as debug logs. Also pins the shape production takes: axios resolves the 403 rather than rejecting, because getStatusAndData disables the status check, and no test covered that branch directly. Includes-AI-Code: true Co-authored-by: Cursor <cursoragent@cursor.com>
Dennis Woditsch (dwoditsch)
marked this pull request as ready for review
August 13, 2026 10:11
|
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.


Description
Stacked on #414. Addresses two open review threads on #405.
The failure message now tells the user what happened. Running
list packages --jsonagainst a broken cover endpoint used to printProblem fetching cui pdf cover, which says neither that CUI marking caused it nor that the listing was never written. All three CUI failures now share one message:The details that used to sit in the message, the missing cover page and the rejected encoding, moved to debug logs, along with the response status.
--debugstill tells the three cases apart.The 403 shape production takes is now covered. Every 403 test used
mockAxiosGetError, which rejects, whilegetStatusAndDatadisables axios' status check so a real 403 resolves and takes the other branch. Behaviour was already correct, but nothing pinned it. There is now a case usingmockAxiosGetWithStatus(COVER_URL, 403, "").The four assertions that matched the old message texts now match the new one, so a future reword cannot quietly drop the "no file was written" part.
Relevant links
Checklist
Made with Cursor