Merge pull request #59303 from ClickHouse/play-rendering-errors-json

Play UI: improve rendering of errors from JSON formats
This commit is contained in:
Alexey Milovidov 2024-01-28 18:32:27 +01:00 committed by GitHub
commit 45cb7094af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -993,7 +993,16 @@
function renderError(response)
{
clear();
document.getElementById('error').innerText = response ? response : "No response.";
let message = response;
try {
let json = JSON.parse(response);
if (json.exception) {
message = json.exception;
}
} catch (e) {}
document.getElementById('error').innerText = message ? message : "No response.";
document.getElementById('error').style.display = 'block';
document.getElementById('logo-container').style.display = 'none';
}