Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when calling recoverUsers twice for the same user #64428

Open
qaisjp opened this issue Aug 13, 2024 · 0 comments
Open

Crash when calling recoverUsers twice for the same user #64428

qaisjp opened this issue Aug 13, 2024 · 0 comments
Assignees

Comments

@qaisjp
Copy link
Contributor

qaisjp commented Aug 13, 2024

  • Sourcegraph version:: 5.6.185
  • Platform information: Sourcegraph Cloud

Steps to reproduce:

  1. Soft delete a user.
  2. Call the following mutation twice for that user: mutation { recoverUsers(userIDs: [$userID]) { alwaysNil } }

Expected behavior:

The error message should say that the user is already recovered, or the request should be idempotent (with the response indicating whether an action was taken).

Actual behavior:

Postgres failure is propagated to the client:

{
  "errors": [
    {
      "message": "ERROR: duplicate key value violates unique constraint \"names_pkey\" (SQLSTATE 23505)",
      "path": [
        "recoverUsers"
      ]
    }
  ],
  "data": {
    "recoverUsers": null
  }
}
@eseliger eseliger self-assigned this Aug 14, 2024
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

No branches or pull requests

2 participants