fixed the error handling when html was in the error body.#43
fixed the error handling when html was in the error body.#43
Conversation
…does not form a error in http. This is from either the underline framework or fronte end.
|
@amaltaro @vkuznet |
|
@yuyiguo , why do you apply these PRs to main branch, they are against DBSClient4go branch which you don't need to use in your testing since you're still making release for python server. The error indeed comes from FE. The problem is that current DBSClient code does not handle HTTP errors coming from FE server, but it does talk to FE in order to reach DBS backend server. What should be correctly added to DBSClient is a check for HTTP Code and it should ONLY perform JSON decoding if HTTP code is 200. For all other codes it should print appropriate message. Moreover, the error you show now clearly indicates the reason which is desired to know when some HTTP request fails. In this case the POST request to DBS BE server fails for some reason. Since error says that it can't reach BE server the actual issue that I made in PR #26 the error of assigning To sum up:
|
|
But the error now may occur now if something will be wrong between FE and BE communication and for that, as I wrote, the DBSClient code should be corrected to check for HTTP code before decoding JSON results. If you want this fix I can provide it. |
|
@vkuznet The error from FE (502 Proxy Error) is not something new. This was because the 300 second limit of the FE was passed. The tests was doing a migration of a dataset and that might take way over 300 second. I don't want to change anything on the server side at this time and the clients knew how to handle this error. This PR fixed the problem and let us to continue. I will commit this PR and build a new release unless I find something wrong. |
|
Here is a suggestion how to better deal with errors: #45 |
|
@vkuznet "#26/#27" was a typo, sorry about it. I meant "#36/#37" that was created by Alan when he tried to fix the problem. This PR already handled the issue. I don't think your PR #45 will solve the problem, but thank you for your try. |
DBS server does not form a error in http. This is from either the underline framework or front end.