Show the actual JSON the API returns for a refused delete - #154
Merged
Conversation
The page said the sentence arrives "as the response body", which was true of the code at the time and is no longer: the router now sends every error message as a JSON object keyed on `error`, so a script reads `.error` rather than the raw text. Shown as a literal body rather than described, because the whole reason to document this is so somebody can write the parse. 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.
Follows FOGProject/fogproject#1475, which makes the router send every error message as a JSON object rather than a bare string.
The page said the sentence arrives "as the response body" — true of the code when #150 landed, and no longer. A script reads
.error, so the page now shows the literal body:{"error": "Cannot delete this storage group because a location still refers to it. Reassign or remove it first."}Shown rather than described, because the reason to document it at all is so somebody can write the parse.
scripts/check-anchors.mjsreports the same 2 broken anchors before and after — both pre-existing legacy../../links, untouched here.Merge after FOGProject/fogproject#1475.