New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix http exception codes. #60252
Fix http exception codes. #60252
Conversation
This is an automated comment for commit 0bc7c0a with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
@kothiga, could you please also look at this test? https://s3.amazonaws.com/clickhouse-test-reports/59975/a7c7a5a671076dfd9be8fb3787a88ef55a392142/stateless_tests__release__databasereplicated__[1_4].html Maybe the reason is somewhere around. |
@alexey-milovidov I've taken a quick look at the failing test that you linked. I tried running it locally on my machine and did not run into the same issue. I downloaded the The following excerpt looks interesting to me, and can be found quick searching
Looking at my local logs after running the test in question, I can see one of these test databases (ex. For this reason, I don't know that it is specifically related to the http handler. |
…ion-codes Fix http exception codes.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fixed a minor bug that caused all http return codes to be 200 (success) instead of a relevant code on exception.
Documentation entry for user-facing changes
In #55739 it was made possible to provide the exception response back to the client in the form of the set default format.
This, however, introduced a small problem where exceptions were being returned as success (200). This is because the
output_format.finalize()
posts the response back to the client before various status messages are set, include exception codes.The adjustment in this PR moves the formatting of header information into a separate function that can be called from both the exception lambda and from
trySendExceptionToClient
.I have expanded the functional test
02899_use_default_format_on_http_exception
to reflect this change, and fixed a small problem in the test that caused queries to be empty (i.e., added--data-binary @-
).