A refused delete now shows a sentence, not the SQL - #152
Merged
Conversation
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>
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.
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:
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.mdneeded no change; it links here rather than quoting the message.scripts/check-anchors.mjsreports 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.