GenSpectrum / LAPIS

An API, a query engine, and a database schema for genomic sequences; currently with a focus on SARS-CoV-2
https://lapis-three.vercel.app
GNU Affero General Public License v3.0
22 stars 6 forks source link

Internal Server Error when invalid request is sent #934

Closed Taepper closed 2 months ago

Taepper commented 2 months ago

curl localhost:8080/sample/aggregated after starting LAPIS and SILO returns an error code 500 instead of an expected 400.

{
  "error": {
    "type": "about:blank",
    "title": "Internal Server Error",
    "status": 500,
    "detail": "invalid URI scheme localhost"
  },
  "info": {
    "dataVersion": null,
    "requestId": "2cf5f5e1-4fa5-4968-ab7c-0ea349ef7016",
    "requestInfo": "sars_cov-2_minimal_test_config on localhost at 2024-09-03T14:45:59.072126380",
    "reportTo": "Please report to https://github.com/GenSpectrum/LAPIS/issues in case you encounter any unexpected issues. Please include the request ID and the requestInfo in your report."
  }
}
JonasKellerer commented 2 months ago

Thank you for raising the issue. How did you start both services? When I use the docker-compose I cant reproduce that error using

SILO_TAG=latest LAPIS_TAG=latest docker compose up -d

and

curl -X 'GET' 'http://localhost:8090/sample/aggregated'  -H 'accept: */*'  -H 'Content-Type: application/json'  -v
Taepper commented 2 months ago

I will shortly upload the whole setup in https://github.com/GenSpectrum/LAPIS-SILO-e2e

Taepper commented 2 months ago

Ah, the http:// was missing from command: "--silo.url=localhost:8081"

fengelniederhammer commented 2 months ago

I'm closing this since the issue seems to be resolved. Feel free to reopen if there is anything we need to fix.

Taepper commented 2 months ago

Hmm, I would reopen this, as I would say that the expected behaviour is to have an error at start-up that the silo url is wrong.

Isn't an error code 500 never supposed to occur?

fengelniederhammer commented 2 months ago

I opened #939 instead, as the actual error in this issue is quite off-topic (compared to the initial description)