Hi folks, I’m experiencing an issue when using upd...
# ory-selfhosting
m
Hi folks, I’m experiencing an issue when using update an identity endpoint on Kratos. When our service calls to update an identity (
PUT
), kratos sometimes returns
409
with the following message:
Copy code
"error":{"code":409,"status":"Conflict","message":"Unable to insert or update resource because a resource with that value exists already"}
Upon further investigation on the postgres db, this is the error log:
Copy code
2022-12-16 18:13:18 UTC:10.0.156.122(41284):postgres@postgres:[3459]:ERROR:  duplicate key value violates unique constraint "identity_credentials_pkey"
2022-12-16 18:13:18 UTC:10.0.156.122(41284):postgres@postgres:[3459]:DETAIL:  Key (id)=(68ad922a-026d-40ac-8029-21a4b89c4062) already exists.
2022-12-16 18:13:18 UTC:10.0.156.122(41284):postgres@postgres:[3459]:STATEMENT:  INSERT INTO "identity_credentials" ("config", "created_at", "id", "identity_credential_type_id", "identity_id", "nid", "updated_at", "version") VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
2022-12-16 18:13:18 UTC:10.0.156.122(41284):postgres@postgres:[3459]:ERROR:  current transaction is aborted, commands ignored until end of transaction block
I am confused as to why the log shows
INSERT
query, where from my understanding and update endpoint should do
UPDATE
query. Any idea what might be the issue? Also, what is the primary key
(id)=(68ad922a-026d-40ac-8029-21a4b89c4062)
used in the DB? I assumed it would be
kratos-id
, but it is different from the
kratos-id
of the update request and when I try to get the identity using that id it returns 404. p.s. we’re using
v0.10.0
gratitude thank you