Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs committed Oct 13, 2023
1 parent fb84802 commit ce075e5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ export const QueryBuilderModal = ({
setIsQueryRetrieved(false);
},
onQueryTestFail: async (err) => {
const response = await err?.response.json();
const response = await err?.response?.json();
const message = response?.message || <FormattedMessage id="ui-plugin-query-builder.error.sww" />;

showCallout({
message: response?.message || <FormattedMessage id="ui-plugin-query-builder.error.sww" />,
message,
type: 'error',
});
setIsQueryRetrieved(false);
Expand Down

0 comments on commit ce075e5

Please sign in to comment.