Skip to content

Handle IntegrityError for AWS identity verification#2575

Merged
Chrystinne merged 3 commits intodevfrom
cf/aws-identity-error-message
Feb 4, 2026
Merged

Handle IntegrityError for AWS identity verification#2575
Chrystinne merged 3 commits intodevfrom
cf/aws-identity-error-message

Conversation

@Chrystinne
Copy link
Copy Markdown
Collaborator

This PR fixes AWS cloud settings form submission from raising a 500 Internal Server Error when the provided aws_userid or aws_user_arn already exists in the database (unique constraint violation).

Changes:

  • Added validation to check if the AWS identity is already linked to another user before form submission;
  • Added IntegrityError handling in AWSVerificationForm.save();
  • Added tests to validate the fix.

Result: Users now receive a user-friendly error message: "This AWS identity is already linked to another PhysioNet account."

@Chrystinne Chrystinne requested a review from bemoody February 4, 2026 18:42
@Chrystinne Chrystinne linked an issue Feb 4, 2026 that may be closed by this pull request
@Chrystinne Chrystinne added this pull request to the merge queue Feb 4, 2026
Merged via the queue into dev with commit 939ae27 Feb 4, 2026
7 checks passed
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.

Handle IntegrityError for AWS identity in cloud settings

2 participants