Skip to content

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

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

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

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8d20d945-39e7-46bb-b604-e067f6dc966d
  • 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
@oshchyhol
oshchyhol marked this pull request as ready for review November 12, 2026 12:15
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.

2 participants