G-Node / gin-doi

G-Node DOI Service
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

Unavailable web page asset leads to panic #130

Open mpsonntag opened 2 years ago

mpsonntag commented 2 years ago

Web page assets are served using go http.FileServer and http.FileSystem via the /assets route.

A requested file that is not available leads to a server panic; e.g. requesting plain "https://[doi url]/assets".

Catch this panic and respond with status code "400 - Bad request" instaed.