mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #14260 from grafana/davkal/fix-14258
Explore: Show logging errors from backend
This commit is contained in:
@@ -727,6 +727,9 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
|
|
||||||
let error: string | JSX.Element = response;
|
let error: string | JSX.Element = response;
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
|
if (typeof response.data === 'string') {
|
||||||
|
error = response.data;
|
||||||
|
} else if (response.data.error) {
|
||||||
error = response.data.error;
|
error = response.data.error;
|
||||||
if (response.data.response) {
|
if (response.data.response) {
|
||||||
error = (
|
error = (
|
||||||
@@ -736,6 +739,9 @@ export class Explore extends React.PureComponent<ExploreProps, ExploreState> {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
throw new Error('Could not handle error response');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState(state => {
|
this.setState(state => {
|
||||||
|
|||||||
Reference in New Issue
Block a user