Skip to content

Commit

Permalink
fix: duplicate error message
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed Dec 9, 2024
1 parent 48c5ee4 commit 9647ced
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions superset-frontend/src/SqlLab/components/ResultSet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import {
css,
getNumberFormatter,
getExtensionsRegistry,
ErrorLevel,
ErrorTypeEnum,
} from '@superset-ui/core';
import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace';
Expand Down Expand Up @@ -559,16 +558,7 @@ const ResultSet = ({
}

if (query.state === QueryState.Failed) {
const errors = [];
if (query.errorMessage) {
errors.push({
error_type: ErrorTypeEnum.GENERIC_DB_ENGINE_ERROR,
extra: {},
level: 'error' as ErrorLevel,
message: query.errorMessage,
});
}
errors.push(...(query.extra?.errors || []), ...(query.errors || []));
const errors = [...(query.extra?.errors || []), ...(query.errors || [])];

return (
<ResultlessStyles>
Expand Down

0 comments on commit 9647ced

Please sign in to comment.