[Bug] RPC return status code 200 even if package is not found
Checklist
-
I confirm that this is an issue with aurweb's code and not a user-uploaded package. -
I have described the bug in complete detail in the Description section. -
I have specified steps in the Reproduction section. -
I have included any logs related to the bug in the Logs section. -
I have included the versions which are affected in the Version(s) section.
Description
When trying to query a package that does not exist in AUR, the status code returned is 200 (OK) and an empty response. I think it should be better to use the 404 (Not Found) status code as it describes exactly what is the problem and keep the empty response.
Reproduction
$ curl -v -X 'GET' 'https://aur.archlinux.org/rpc/v5/info/foo'
Edited by lapsiu xorg