Skip to content

✨ feature: not_verified and deactivated AdminUserActionErrorCode (sdk#371) - #375

Merged
arturasmckwcz merged 1 commit into
mainfrom
371-admin-action-error-codes
Nov 21, 2026
Merged

arturasmckwcz merged 1 commit into
mainfrom
371-admin-action-error-codes

Conversation

@arturasmckwcz

Copy link
Copy Markdown
Collaborator

Closes #371

Adds two codes to AdminUserActionErrorCode so be can replace its plain BadRequestErrors with AdminActionError:

  • not_verified: POST /user/:id/deactivate or POST /user/:id/password-reset on an account that was never verified
  • deactivated: POST /user/:id/password-reset on a deactivated account

snake_case to match the existing codes in the same union and what be already sends (not_deactivated, last_admin). Type test updated in src/utils/role.test.ts.

be follow-up: bump the sdk, throw AdminActionError with these codes, assert them in user-admin.routes.test.ts.

🤖 Generated with Claude Code

…#371)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@arturasmckwcz arturasmckwcz self-assigned this Nov 21, 2026

@need4deed need4deed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arturasmckwcz
arturasmckwcz merged commit 1f83c0c into main Nov 21, 2026
1 check passed
@arturasmckwcz
arturasmckwcz deleted the 371-admin-action-error-codes branch November 21, 2026 23:44
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.

✨ AdminUserActionErrorCode: codes for unverified and deactivated targets

2 participants