Skip to content

SP-1173: say what to do when CUI marking cannot be resolved - #416

Open
Dennis Woditsch (dwoditsch) wants to merge 1 commit into
feat/SP-1173-cui-cover-response-semanticsfrom
fix/SP-1173-cui-marking-error-message
Open

SP-1173: say what to do when CUI marking cannot be resolved#416
Dennis Woditsch (dwoditsch) wants to merge 1 commit into
feat/SP-1173-cui-cover-response-semanticsfrom
fix/SP-1173-cui-marking-error-message

Conversation

@dwoditsch

@dwoditsch Dennis Woditsch (dwoditsch) commented Aug 13, 2026

Copy link
Copy Markdown

Description

Stacked on #414. Addresses two open review threads on #405.

The failure message now tells the user what happened. Running list packages --json against a broken cover endpoint used to print Problem 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:

Could not resolve CUI marking. No file was written

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. --debug still tells the three cases apart.

The 403 shape production takes is now covered. Every 403 test used mockAxiosGetError, which rejects, while getStatusAndData disables 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 using mockAxiosGetWithStatus(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

  • I have self-reviewed this PR
  • I have tested the change and proved that it works in different scenarios
  • I have updated docs if needed

Made with Cursor

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>
@dwoditsch
Dennis Woditsch (dwoditsch) marked this pull request as ready for review August 13, 2026 10:11
@dwoditsch
Dennis Woditsch (dwoditsch) requested a review from a team as a code owner August 13, 2026 10:11
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
80.0% Coverage on New Code (required ≥ 85%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant