ad-freiburg / qlever

Very fast SPARQL Engine, which can handle very large knowledge graphs like the complete Wikidata, offers context-sensitive autocompletion for SPARQL queries, and allows combination with text search. It's faster than engines like Blazegraph or Virtuoso, especially for queries involving large result sets.
Apache License 2.0
376 stars 45 forks source link

Fix handling of exceptions and errors in lazy output #1472

Closed joka921 closed 3 weeks ago

joka921 commented 1 month ago

So far, when an error occurred after the sending of the result began, the HTTP status code was OK but the result was not. This resulted in confusing behavior in the QLever UI. In particular, if no result was produced at all, the QLever UI would wait for the result until the timeout and then show some generic error message. Since #1438, this affected any query with an error message, with the effect that no more specific error messages were shown in the QLever UI. This is now fixed now as follows:

  1. When the error occurs before the sending of the result begins (the typical case), a non-200 HTTP code is sent just like before (this was broken by #1438).

  2. When the error occurs after the sending of the result has begun, a 200 HTTP code is sent (HTTP provides no way to change this code after sending has begun), but when the error occurs a message is sent that begins with a highly unusual character sequence (currently !!!!>>#). This message could then be detected by the QLever UI or other tools. It is important to understand that this is not a problem specific to QLever, but a problem of the simplistic HTTP 1.1 protocol.

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.53%. Comparing base (90cd347) to head (9f48d9b). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1472 +/- ## ========================================== - Coverage 89.55% 89.53% -0.02% ========================================== Files 347 347 Lines 25590 25605 +15 Branches 3440 3441 +1 ========================================== + Hits 22916 22925 +9 Misses 1486 1486 - Partials 1188 1194 +6 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 3 weeks ago

Quality Gate Failed Quality Gate failed

Failed conditions
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint