hughhhh commented on a change in pull request #15242:
URL: https://github.com/apache/superset/pull/15242#discussion_r656597816



##########
File path: superset-frontend/src/views/CRUD/hooks.ts
##########
@@ -648,35 +648,11 @@ export function useDatabaseValidation() {
           setValidationErrors(null);
         })
         .catch(e => {
+          console.log('check Params', checkParams);
           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',
-                )
-                .reduce(
-                  (
-                    obj: {},
-                    {
-                      extra,
-                      message,
-                    }: {
-                      extra: { invalid?: string[] };
-                      message: string;
-                    },
-                  ) => {
-                    // if extra.invalid doesn't exist then the
-                    // error can't be mapped to a parameter
-                    // so leave it alone
-                    if (extra.invalid) {
-                      return { ...obj, [extra.invalid[0]]: message };
-                    }
-                    return obj;
-                  },
-                  {},
-                );
-              setValidationErrors(parsedErrors);
+              setValidationErrors(errors);
+              console.log(validationErrors);

Review comment:
       remove console log




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to