Incorrect HTTP code when attempting to create a recovery link for non-existing user #3848
Open
3 of 5 tasks
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
Upon calling the
/admin/recovery/link
route with anidentity_id
that does not exist, an HTTP 400 status code is sent back, when a 404 is what would have been expected (As the OpenAPI would have let think that this route can indeed return a 404 error.This seems to be related to #1664 except there seems to be a discrepancy between the issue (returning a 404 error when the body is invalid, because the identity_id would be empty and as such not correspond to an existing identity) and what the fix actually did (if an identity is not found, return a 400)
Reproducing the bug
/admin/recovery/link
with anidentity_id
value that does not match an existing identityerror.reason
field being set toThe requested identity id does not exist.
Relevant log output
No response
Relevant configuration
No response
Version
0.13
On which operating system are you observing this issue?
None
In which environment are you deploying?
None
Additional Context
No response
The text was updated successfully, but these errors were encountered: