Skip to content

A refused delete now shows a sentence, not the SQL - #152

Merged
mastacontrola merged 2 commits into
masterfrom
document-refused-delete-message
Aug 29, 2026
Merged

A refused delete now shows a sentence, not the SQL#152
mastacontrola merged 2 commits into
masterfrom
document-refused-delete-message

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Follow-up to #150. That page described a refused delete as it looked when the raw MariaDB constraint violation reached the screen. FOGProject/fogproject#1473 translates it, so the page was describing the fallback as if it were the normal case.

What you normally see now:

Cannot delete this storage group because a location still refers to it. Reassign or remove it first.

The raw message is kept as a note, because it is still reachable: a constraint added by hand, or left by an older release, has no plain-English description to look up. The guidance on reading fk_<table>_<column> goes with it. That is the accurate relationship between the two — one is normal, the other is the fallback — rather than dropping either.

Added the API side, which the page did not cover: the same message comes back as HTTP 409 Conflict with the sentence in msg. Worth stating explicitly, because 409 means the request itself was fine and will succeed once the blocking record is dealt with — that is what lets a script distinguish "fix this and retry" from "this request was wrong".

docs/management/web/storage-node.md needed no change; it links here rather than quoting the message.

scripts/check-anchors.mjs reports the same 2 broken anchors before and after this change — both pre-existing legacy ../../ links, untouched here.

Merge after FOGProject/fogproject#1473, so the docs do not describe behavior that has not shipped.

mastacontrola and others added 2 commits August 29, 2026 13:37
The page described what a refused delete looked like when the raw MariaDB
constraint violation was what reached the screen. FOG now translates it:

    Cannot delete this storage group because a location still refers to it.
    Reassign or remove it first.

The database's own text is still possible -- a constraint added by hand, or
left by an older release, has no plain-English description to look up -- so
it is kept as a note with the guidance on reading it, rather than dropped.
That is the accurate relationship between the two: one is what you normally
see, the other is the fallback.

Added the API side, which the page did not cover at all: the same message
comes back as HTTP 409 Conflict with the sentence in `msg`. Worth stating
because 409 specifically means the request was fine and will work once the
blocking record is dealt with, which is what lets a script tell "fix this and
retry" apart from "this request was wrong".

Co-Authored-By: Claude <noreply@anthropic.com>
Said the sentence arrives in a `msg` field. It does not -- the router
echoes the message as the response body, so that is what a script reads.

Co-Authored-By: Claude <noreply@anthropic.com>
@mastacontrola
mastacontrola merged commit 1b8f99f into master Aug 29, 2026
@mastacontrola
mastacontrola deleted the document-refused-delete-message branch August 29, 2026 19:11
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