docker-polr
docker-polr copied to clipboard
500 Error on /action/lookup instead of 404 when url_ending does not exist
Hi! Thank you for making this docker image - really appreciate it. I ran in to an issue when running a GET/POST
on the action/lookup
endpoint. When using the endpoint to confirm that a url_ending
has been used, it works perfectly if the ending DOES exist in the database, however, if the link DOES NOT exist, then I receive a 500 error instead of a 404 Link does not exist
as mentioned in the Polr source code here
I ran this test on the official demo site Polr has: demo.polr.me
and this same API call returns a 404 (which is what I expect). Which leads me to believe it's an issue in this image, so I was wondering if anyone else had this problem?
I deployed on DigitalOcean with the following configuration setup using mysql
in another container on same host:
DB_HOST=MYHOST
DB_DATABASE=link
DB_USERNAME=root
DB_PASSWORD=MYSECRETPASSWORD
APP_ADDRESS=link.encoreapp.co
ADMIN_USERNAME=root
ADMIN_PASSWORD=MYSECRETPASSWORD
Here's the GET error I receive:
2021-03-13T05:24:39.865756513Z 10.0.1.14 - - [13/Mar/2021:05:24:39 +0000] "GET /api/v2/action/lookup?url_ending=test&key=MYAPIKEY HTTP/1.0" 500 4558 "-" "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)" "108.214.21.187" 0.081 0.080 . -
This 500 returns HTML and says: Whoops, looks like something went wrong.
No other help message unfortunately.
Can anyone else replicate?