Skip to content

Show the actual JSON the API returns for a refused delete - #154

Merged
mastacontrola merged 1 commit into
masterfrom
document-api-error-body
Aug 29, 2026
Merged

Show the actual JSON the API returns for a refused delete#154
mastacontrola merged 1 commit into
masterfrom
document-api-error-body

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

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.mjs reports the same 2 broken anchors before and after — both pre-existing legacy ../../ links, untouched here.

Merge after FOGProject/fogproject#1475.

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>
@mastacontrola
mastacontrola merged commit b6827d0 into master Aug 29, 2026
@mastacontrola
mastacontrola deleted the document-api-error-body 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