Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

500 Error on /action/lookup instead of 404 when url_ending does not exist #17

Open
uncvrd opened this issue Mar 13, 2021 · 2 comments
Open
Labels
polr issue Problem related to Polr, not the Docker image wontfix This will not be worked on

Comments

@uncvrd
Copy link

uncvrd commented Mar 13, 2021

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?

@GMartinez-Sisti
Copy link

Hi @uncvrd, this probably needs to be reported in the application repository -> cydrobolt/polr. This repository is just building a docker image with the application artifact.

@ajanvier
Copy link
Owner

ajanvier commented May 26, 2022

Hello @uncvrd, I was able to reproduce this problem but as @GMartinez-Sisti said, it seems to be a Polr issue...

@ajanvier ajanvier added wontfix This will not be worked on polr issue Problem related to Polr, not the Docker image labels May 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
polr issue Problem related to Polr, not the Docker image wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants