Skip to content

Commit

Permalink
fix: password errors on validation (#15372)
Browse files Browse the repository at this point in the history
* filter out password supply for validation

* filter password
  • Loading branch information
hughhhh authored Jun 24, 2021
1 parent bc727f4 commit 913b29c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions superset-frontend/src/views/CRUD/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,13 @@ export function useDatabaseValidation() {
if (typeof e.json === 'function') {
e.json().then(({ errors = [] }: JsonObject) => {
const parsedErrors = errors
.filter(
(error: { error_type: string }) =>
error.error_type !==
'CONNECTION_MISSING_PARAMETERS_ERROR' || onCreate,
)
.filter((error: { error_type: string }) => {
const skipValidationError = ![
'CONNECTION_MISSING_PARAMETERS_ERROR',
'CONNECTION_ACCESS_DENIED_ERROR',
].includes(error.error_type);
return skipValidationError || onCreate;
})
.reduce(
(
obj: {},
Expand Down

0 comments on commit 913b29c

Please sign in to comment.