rusackas commented on code in PR #44238:
URL: https://github.com/apache/superset/pull/44238#discussion_r4060275476


##########
superset-frontend/src/features/userInfo/UserInfoModal.tsx:
##########
@@ -59,8 +59,11 @@ function UserInfoModal({
           : t('The password reset was successful'),
       );
       onSave();
-    } catch (error) {
-      addDangerToast(t('Something went wrong while saving the user info'));
+    } catch (response) {
+      const { error } = await getClientErrorObject(response);
+      addDangerToast(
+        error || t('Something went wrong while saving the user info'),
+      );

Review Comment:
   Good catch, but this one's already fixed. `onSave()` only fires in the try 
block now, and the catch re-throws so `FormModal` doesn't treat a failed save 
as success. Covered in `UserInfoModal.test.tsx`.



-- 
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.

To unsubscribe, e-mail: [email protected]

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