mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Play UI: improve rendering of errors from JSON formats
This commit is contained in:
parent
f2bad692e2
commit
9dd6362ae7
@ -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