Skip to content

Document the 422 for a paid organization's last sub account - #71

Draft
oshchyhol wants to merge 1 commit into
mainfrom
document-paid-org-last-sub-account-422
Draft

oshchyhol wants to merge 1 commit into
mainfrom
document-paid-org-last-sub-account-422

Conversation

@oshchyhol

Copy link
Copy Markdown
Contributor

Motivation

The API now refuses to delete the last sub account of an organization on a paid plan: only the organization owner can delete it, and an API token is never the owner. The reference should list the new 422.

Merge once the API change is live.

Changes

  • document the 422 on DELETE /api/organizations/{organization_id}/sub_accounts/{sub_account_id}, with its error message
  • reword the description: deleting the last sub account still deletes the organization, but on a paid plan only the owner can do it, in the app

How to test

  • the "Delete organization sub account" page lists a 422 response with the example {"errors": "Only the organization owner can delete the last sub-account of an organization on a paid plan."}
  • the page description says the API can't delete the last sub account of an organization on a paid plan

Images and GIFs

N/A

@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@oshchyhol
oshchyhol force-pushed the document-paid-org-last-sub-account-422 branch from 63c6c67 to 5116b3e Compare November 11, 2026 18:37
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