@@ -7,6 +7,7 @@ import useLocalize from '@hooks/useLocalize';
77import useOnyx from '@hooks/useOnyx' ;
88import useThemeStyles from '@hooks/useThemeStyles' ;
99import { resetSamlEnabledError , resetSamlRequiredError , setSamlEnabled , setSamlRequired } from '@libs/actions/Domain' ;
10+ import { getLatestErrorMessageField } from '@libs/ErrorUtils' ;
1011import CONST from '@src/CONST' ;
1112import ONYXKEYS from '@src/ONYXKEYS' ;
1213import { domainSamlSettingsStateSelector } from '@src/selectors/Domain' ;
@@ -38,7 +39,7 @@ function SamlLoginSectionContent({accountID, domainName, isSamlEnabled, isSamlRe
3839 < >
3940 < OfflineWithFeedback
4041 pendingAction = { domain ?. isSamlEnabledLoading ? CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE : undefined }
41- errors = { domain ?. samlEnabledError }
42+ errors = { getLatestErrorMessageField ( { errors : domain ?. samlEnabledError } ) }
4243 onClose = { ( ) => resetSamlEnabledError ( accountID ) }
4344 dismissError = { ( ) => resetSamlEnabledError ( accountID ) }
4445 >
@@ -60,7 +61,7 @@ function SamlLoginSectionContent({accountID, domainName, isSamlEnabled, isSamlRe
6061 { isSamlEnabled && (
6162 < OfflineWithFeedback
6263 pendingAction = { domain ?. isSamlRequiredLoading ? CONST . RED_BRICK_ROAD_PENDING_ACTION . UPDATE : undefined }
63- errors = { domain ?. samlRequiredError }
64+ errors = { getLatestErrorMessageField ( { errors : domain ?. samlRequiredError } ) }
6465 onClose = { ( ) => resetSamlRequiredError ( accountID ) }
6566 dismissError = { ( ) => resetSamlRequiredError ( accountID ) }
6667 >
0 commit comments