Skip to content

refactor: Implemented pagination for Organizations plugin list endpoints. - #106

Merged
m-t-a97 merged 3 commits into
mainfrom
chore/organizations-plugin-pagination
Aug 24, 2026
Merged

refactor: Implemented pagination for Organizations plugin list endpoints.#106
m-t-a97 merged 3 commits into
mainfrom
chore/organizations-plugin-pagination

Conversation

@m-t-a97

@m-t-a97 m-t-a97 commented Aug 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@m-t-a97 m-t-a97 self-assigned this Aug 21, 2026
@m-t-a97 m-t-a97 changed the title refactor: Organizations plugin list endpoints now implement pagination. refactor: Implemented pagination for Organizations plugin list endpoints. Aug 22, 2026
… code.

- Quota rejections returned 429 Too Many Requests, which in this API already
  means rate limiting: the rate-limit and api-key plugins return it paired with
  Retry-After and X-RateLimit-* headers. A quota is not transient, so standard
  retry middleware backed off and retried a condition that can only clear once
  someone frees a slot or raises the configured limit. Quotas now return 409
  Conflict, leaving 429 to mean rate limiting everywhere in the API.
- Add a typed Error carrying Code, Status and Message so error responses include
  a stable machine-readable code alongside the human-readable message, and
  clients no longer have to match on English prose.
- Dispatch on errors.AsType rather than error identity, so a wrapped plugin
  error keeps its status and code instead of silently degrading to 400.
- Add AssertErrorResponse alongside AssertErrorMessage for asserting the code.
- Add table-driven tests covering each sentinel, wrapped and doubly wrapped
  errors, delegation to the core handler, sentinel comparability, and a golden
  list of the registered codes.

Affects POST /organizations, POST /organizations/{id}/members,
POST /organizations/{id}/invitations, and PATCH
/organizations/{id}/invitations/{id}/accept. members_limit defaults to 100 when
unset, so this is reachable on a default configuration.

BREAKING CHANGE: organization quota rejections return 409 instead of 429.
@m-t-a97
m-t-a97 merged commit c3e36fc into main Aug 24, 2026
6 checks passed
@m-t-a97
m-t-a97 deleted the chore/organizations-plugin-pagination branch August 24, 2026 00:53
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