mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #59303 from ClickHouse/play-rendering-errors-json
Play UI: improve rendering of errors from JSON formats
This commit is contained in:
commit
45cb7094af
@ -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';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user