User friendly error for VIM accounts
[osm/UI.git] / skyquake / plugins / accounts / src / account / account.jsx
index b7dbf35..41a3046 100644 (file)
@@ -23,6 +23,7 @@ import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx'
 import Crouton from 'react-crouton';
 import TextInput from 'widgets/form_controls/textInput.jsx';
 import {AccountConnectivityStatus} from '../account_sidebar/accountSidebar.jsx';
+import Utils from 'utils/utils.js';
 import 'style/common.scss';
 import './account.scss';
 class Account extends React.Component {
@@ -106,8 +107,8 @@ class Account extends React.Component {
             self.props.router.push({pathname:'accounts'});
             self.props.flux.actions.global.hideScreenLoader.defer();
         },
-         function() {
-            self.props.flux.actions.global.showNotification("There was an error creating your account. Please contact your system administrator.");
+         function(error) {
+            self.props.flux.actions.global.showNotification(Utils.parseError(error));
             self.props.flux.actions.global.hideScreenLoader.defer();
          });
     }