Skip to content

core: Form friendly error on uniqueness constraint. - #23864

Merged
GirlBossRush merged 2 commits into
mainfrom
fix-stage-uniqueness-error
Jul 9, 2026
Merged

GirlBossRush merged 2 commits into
mainfrom
fix-stage-uniqueness-error

Conversation

@GirlBossRush

Copy link
Copy Markdown
Contributor

Details

This PR fixes a small bug I encountered when creating a new prompt stage. The name "foobar" already existed, which caused an IntegrityError due to the unique constraint on the stage name. This is correct, but the front-end form error handler expected a more typical API error response, rather than a full Django error page.

@GirlBossRush GirlBossRush self-assigned this Jul 9, 2026
@GirlBossRush
GirlBossRush requested a review from a team as a code owner July 9, 2026 00:48
@GirlBossRush GirlBossRush changed the title core, Ensure proper error is thrown on uniqueness constraint. core: Throw Form Friendly Error On Uniqueness Constraint. Jul 9, 2026
@netlify

netlify Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit 640b9db
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/6a4fa29883175f0008ca6af0
😎 Deploy Preview https://deploy-preview-23864--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.23%. Comparing base (93e8ff5) to head (640b9db).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23864      +/-   ##
==========================================
+ Coverage   93.19%   93.23%   +0.03%     
==========================================
  Files        1043     1043              
  Lines       60992    60989       -3     
  Branches      424      424              
==========================================
+ Hits        56840    56861      +21     
+ Misses       4152     4128      -24     
Flag Coverage Δ
conformance 36.32% <ø> (+0.03%) ⬆️
e2e 41.51% <ø> (+0.53%) ⬆️
integration 32.73% <ø> (-0.01%) ⬇️
rust 0.00% <ø> (ø)
unit 92.30% <ø> (+<0.01%) ⬆️
unit-migrate 92.33% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@GirlBossRush GirlBossRush changed the title core: Throw Form Friendly Error On Uniqueness Constraint. core: Form friendly error on uniqueness constraint. Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

authentik PR Installation instructions

Instructions for docker-compose

Add the following block to your .env file:

AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-640b9dba923bb152318526fdaf85b7072052ba1b
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s

Afterwards, run the upgrade commands from the latest release notes.

Instructions for Kubernetes

Add the following block to your values.yml file:

authentik:
    outposts:
        container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
    image:
        repository: ghcr.io/goauthentik/dev-server
        tag: gh-640b9dba923bb152318526fdaf85b7072052ba1b

Afterwards, run the upgrade commands from the latest release notes.

@github-project-automation github-project-automation Bot moved this from Todo to In Progress in authentik Core Jul 9, 2026
@BeryJu BeryJu added the backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5 label Jul 9, 2026
@GirlBossRush
GirlBossRush merged commit b38ed7d into main Jul 9, 2026
111 checks passed
@GirlBossRush
GirlBossRush deleted the fix-stage-uniqueness-error branch July 9, 2026 14:37
@github-project-automation github-project-automation Bot moved this from In Progress to Done in authentik Core Jul 9, 2026
@authentik-cherry-pick

Copy link
Copy Markdown
Contributor

🍒 Cherry-pick to version-2026.5 created: #23881

kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
* main: (34 commits)
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  core: bump library/node from 26.4.0-trixie to 26.5.0-trixie in /website (#23874)
  web: fix table refresh button not refreshing table data (#23780)
  endpoints: handle exception in connector controller sync setup (#23852)
  internal/outpost/ak: handle empty outpost list during refresh (#23827)
  web/admin/stages/captcha: fix float values in score tresholds fix provider parsing (#22782)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
* web/cleanup/task-card: (35 commits)
  Just trying to make life a little better.
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  core: bump library/node from 26.4.0-trixie to 26.5.0-trixie in /website (#23874)
  web: fix table refresh button not refreshing table data (#23780)
  endpoints: handle exception in connector controller sync setup (#23852)
  internal/outpost/ak: handle empty outpost list during refresh (#23827)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
* web/cleanup/task-card-3: (38 commits)
  Just trying to make life a little better.
  web/bug: harmonize and make routine the display of tasks (part 3: problem children)
  Just trying to make life a little better.
  Just trying to make life a little better.
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  core: bump library/node from 26.4.0-trixie to 26.5.0-trixie in /website (#23874)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
…card-2

* web/cleanup/schedule-card-1: (38 commits)
  Just trying to make life a little better.
  web/bug: harmonize and make routine the display of tasks (part 3: problem children)
  Just trying to make life a little better.
  Just trying to make life a little better.
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  core: bump library/node from 26.4.0-trixie to 26.5.0-trixie in /website (#23874)
  ...
kensternberg-authentik added a commit that referenced this pull request Jul 9, 2026
…card-3-problem-children

* web/cleanup/schedule-card-2: (39 commits)
  Just trying to make life a little better.
  Just trying to make life a little better.
  web/bug: harmonize and make routine the display of tasks (part 3: problem children)
  Just trying to make life a little better.
  Just trying to make life a little better.
  lifecycle/container: increase start time to 120s (#23896)
  ci: fix fork checks (#23894)
  root: fix docker compose pg volume path for compatibility with pg18 (#23883)
  ci: better image building (#23359)
  core: bump library/postgres from 16 to 18 in /scripts (#23812)
  core: Form friendly error on uniqueness constraint. (#23864)
  packages: migrate shared pins to the pnpm catalog: protocol (#23784)
  core, web: update translations (#23863)
  core: bump github.com/coreos/go-oidc/v3 from 3.19.0 to 3.20.0 (#23867)
  core: bump github.com/pires/go-proxyproto from 0.13.0 to 0.14.0 (#23868)
  core: bump golang.org/x/sync from 0.21.0 to 0.22.0 (#23866)
  core: bump library/node from `a1d9d67` to `ffc7838` in /lifecycle/container (#23871)
  core: bump axllent/mailpit from v1.30.3 to v1.30.4 in /tests/e2e (#23869)
  core: bump goauthentik/fips-python from `0d4cd1a` to `80d28af` in /lifecycle/container (#23872)
  core: bump library/golang from `756f3b7` to `ee5a795` in /lifecycle/container (#23873)
  ...
PeshekDotDev pushed a commit that referenced this pull request Jul 21, 2026
… to version-2026.5) (#23881)

core: Form friendly error on uniqueness constraint. (#23864)

Ensure proper error is thrown on uniqueness constraint.

Co-authored-by: Teffen Ellis <[email protected]>
Co-authored-by: Jens L. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend backport/version-2026.5 Add this label to PRs to backport changes to version-2026.5

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants