qEndpoint icon indicating copy to clipboard operation
qEndpoint copied to clipboard

`500 Internal Server Error` on invalid SPARQL query

Open namedgraph opened this issue 1 year ago • 0 comments

Part of the endpoint? (leave empty if you don't know)

  • [X] Backend (qendpoint-backend)
  • [ ] Store (qendpoint-backend)
  • [ ] Core (qendpoint-core)
  • [ ] Frontend (qendpoint-frontend)
  • [ ] Other

Description of the issue

Invalid SPARQL query syntax (e.g. missing prefixes) result in 500 Internal Server Error response.

Excepted behavior

I would expect a 400 Bad Request response since this is a client error, as per SPARQL 1.1 Protocol Failure Responses.

Obtained behavior

{"timestamp":"2023-06-27T07:46:06.784+00:00","status":500,"error":"Internal Server Error","path":"/api/endpoint/sparql"}

How to reproduce

Seems like executing any query with a missing prefix declaration.

Endpoint version

No response

Do I want to contribute to fix it?

None

Something else?

No response

namedgraph avatar Jun 27 '23 07:06 namedgraph