AtlasOfLivingAustralia / image-service

Image repository and tiling services
https://images.ala.org.au
0 stars 17 forks source link

API image get returns 500 instead of 404 #97

Closed javier-molina closed 4 years ago

javier-molina commented 4 years ago

Steps to reproduce:

REDBACK-GS:~ mol109$ wget -O image.png "https://images-dev.ala.org.au/image/3c79e6a6-3861-4a9c-975b-a32b84bc5ca9" --header="Accept: image/jpeg" 

Expected 404 code

Actual 500 code

ansell commented 4 years ago

HTTP 500 is a legitimate response code for an invalid URL structure. Using a GUID instead of "ABC" returns the expected dummy image as designed. Closing this as not an issue.

This is the equivalent wget command I used to test it myself with a properly structured test URL:

wget -O image.png "https://images-dev.ala.org.au/image/3c79e6a6-3861-4a9c-975b-a32b84bc5ca9" --header="Accept: image/jpeg"
--2019-10-18 09:00:45--  https://images-dev.ala.org.au/image/3c79e6a6-3861-4a9c-975b-a32b84bc5ca9
Resolving images-dev.ala.org.au (images-dev.ala.org.au)... 130.56.246.8
Connecting to images-dev.ala.org.au (images-dev.ala.org.au)|130.56.246.8|:443... connected.
HTTP request sent, awaiting response... 404 
2019-10-18 09:00:45 ERROR 404: (no description).
javier-molina commented 4 years ago

Thanks @ansell for the point on ABC not being a valid GUID.

I tested your scenario and I'm still getting 500, so I'm reopening not to mention that @djtfmartin had already comfirmed this as a bug: https://github.com/AtlasOfLivingAustralia/cab/issues/13#issuecomment-542858565

ansell commented 4 years ago

This bug should not be a reason to avoid releasing image-service-1.0.11 as HTTP 404 is returned if you test with properly structured GUIDs. ABC isn't ever going to be recognised as an identifier for an image as the GUID specification is quite distinct about the syntax.

Assigning priority-low so it doesn't disrupt the release schedule.

ansell commented 4 years ago

There was one change this morning, deploying 1.0.11. Your testing over the past few days was on an unknown 1.0.11-SNAPSHOT version unfortunately which invalidates it in terms of CAB.

Since deploying 1.0.11 I am also getting HTTP 500 for that call

djtfmartin commented 4 years ago

This is fixed on the develop branch which is now deployed to images-dev.ala.org.au

ansell commented 4 years ago

This is working for me on images-dev.