hydra
hydra copied to clipboard
GET /clients/{id} returns 404 despite being deliberately changed from 404 to 401 previously
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Cloud project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
GET /clients/{id} returns 404 when a client does not exist.
This was 404 in the past, but changed to 401 in https://github.com/ory/hydra/issues/1617.
The test says "get client will return The request could not be authorized" and then asserts that it returns 404:
https://github.com/ory/hydra/blob/1cab940846c0f00248878ee3074740797fc6be2d/client/sdk_test.go#L136-L140
Reproducing the bug
Make a GET request to /clients/{id} with an ID that does not exist.
Relevant log output
No response
Relevant configuration
No response
Version
1.11.10
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Binary
Additional Context
I don't really mind what the status code is, but it deserves a mention in the change log, thankfully our tests caught it.