Skip to content

feat(errors): register INVITE_ADDRESS_REQUIRED and INVITE_USERS_INVALID - #1825

Merged
pyramation merged 1 commit into
mainfrom
feat/provision-user-errors
Sep 11, 2026
Merged

feat(errors): register INVITE_ADDRESS_REQUIRED and INVITE_USERS_INVALID#1825
pyramation merged 1 commit into
mainfrom
feat/provision-user-errors

Conversation

@pyramation

Copy link
Copy Markdown
Contributor

Summary

Registers the two codes raised by the new scope-aware provision_<scope>_user / provision_<scope>_users_bulk functions (constructive-db feat/admin-provision-users) so they classify as public/400 at the transport layer instead of internal/500:

INVITE_ADDRESS_REQUIRED  // public 400 — neither email nor phone supplied
INVITE_USERS_INVALID     // public 400 — bulk `users` payload is not a JSON array

scripts/db-error-inventory.json and registry.generated.ts were refreshed by re-running audit-db-errors.py + generate-registry.py against that constructive-db branch; the refresh also picks up a few codes that landed on constructive-db main since the last audit (PERMISSION_DENIED, ROUTE_DOMAIN_REQUIRED, HOSTNAME_CLAIMED_IN_OTHER_PLANE, DATA_PERMISSIONS_MODULE_REF_INVALID).

Link to Devin session: https://app.devin.ai/sessions/b594a9d9c24e40ec9968fef407df5af3
Open in Devin Desktop: https://app.devin.ai/desktop/session/b594a9d9c24e40ec9968fef407df5af3?variant=devin
Requested by: @pyramation

Refresh the constructive-db error audit inventory and regenerated registry.
@devin-ai-integration

Copy link
Copy Markdown
Contributor

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@tenki-reviewer

tenki-reviewer Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review complete. No issues found — approved ✅.


This PR revises the error-code definitions in the Constructive packages/errors package and refreshes the generated database error inventory that mirrors them. The review scanned the registry source and the inventory artifact across correctness, API-data, and domain-specific lenses, and cross-checked the two files for consistency. No defects were found: error codes are unique, HTTP status mappings are appropriate, and the inventory counts and classifications match the registry. The change is low-risk and safe to merge.

Files Change
packages/errors/src/registry.ts Adjusts public error registry definitions (codes, messages, HTTP status, class/visibility).
packages/errors/scripts/db-error-inventory.json Regenerated DB error inventory reflecting the registry updates.

Reviewed commit: a7af570

@pyramation
pyramation merged commit 780c624 into main Sep 11, 2026
21 checks passed
@pyramation
pyramation deleted the feat/provision-user-errors branch September 11, 2026 06:45
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