legumeinfo / microservices

A collection of microservices developed and maintained by the Legume Information System
https://legumeinfo.org/
Apache License 2.0
3 stars 2 forks source link

Return a 404 or 200 with message rather than a 500 #603

Closed sammyjava closed 10 months ago

sammyjava commented 1 year ago

Right now a GET or POST to https://services.lis.ncgr.org/gene_linkouts returns a 500, leading one to believe the server is down. It would be better to return a 404, or even a 200 with an error message in the JSON.

alancleary commented 1 year ago

What are the details of the request? Are there querystring parameters with the GET or data in the body of the POST? If there is, are the parameters invalid or valid?

sammyjava commented 1 year ago

Empty root request. As in checking to see if the service is up. Not a ginormous issue, I just think a 500 is an inappropriate response when the service is running. Normally that would come from Apache to let you know the service is down.

alancleary commented 1 year ago

OK. I think the appropriate response here would be 400 (bad request) since required parameters are missing.

sammyjava commented 1 year ago

Oh, yeah, right, a 400 indeed.

adf-ncgr commented 10 months ago

fixed in d11cd02