Hi :wave: I am testing out the API endpoint to cre...
# ory-network
b
Hi đź‘‹ I am testing out the API endpoint to create multiple identities (
PATCH /admin/identities
). I notice that in case an identity with the given email already exists, the API rejects the request with
409
. This is normally the expected behaviour if I’m creating a single identity, but in case of multiple ones I was expecting the API to “gather” the errors and return them in bulk as described here: https://www.ory.sh/docs/kratos/manage-identities/import-user-accounts-identities#errors-during-bulk-import Can you clarify this? Thanks 🤗
s
I'm not sure about the overall status code of the response, did you check whether the body matches the example from the documentation?
b
Yes, the payload is fine. If I send a request with “unique” emails everything works fine. It’s just in the case of an existing email.
s
ok in that case I think it is expected behavior so that you notice when some identity failed to import
b
In the docs (Errors during bulk import) it explicitly says
Failure to import an identity will not fail the whole bulk import.
and the example response contains in fact a
409
error case. That’s where my confusion is.
s
hm yeah the operation probably did succeed, but the status code is still 409
it might actually be better do respond with 200 or 201 here...
b
Good morning 👋 I just tried again and now it’s working as expected. Did something change or were you able to fix that? Thanks
s
no nothing changed
glad it works, but maybe you can dm me some details about the request so I can find it in our logs and see if there is anything different now
b
I don’t have the logs from yesterday…do you want to inspect the requests from today?
s
a rough timeframe and request host/path are probably sufficient
can you reproduce the error today?
b
The timeframe would be yesterday. I can send you the project ID if it helps (I was testing it locally using the tunnel). Today I couldn’t reproduce the issue so far.