mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 10:22:46 +00:00
Improve response catch module (#3848)
* add err hanlder for dialog ajax request * add error handler for component ajax request * repair code bug * repair code bug * add handler for page ajax module
This commit is contained in:
@@ -4,6 +4,7 @@ import ReactDOM from 'react-dom';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { siteRoot, gettext, appAvatarURL } from '../../utils/constants';
|
||||
import toaster from '../toast';
|
||||
|
||||
const propTypes = {
|
||||
isAdminPanel: PropTypes.bool,
|
||||
@@ -79,6 +80,9 @@ class Account extends Component {
|
||||
isOrgStaff: resp.data.is_org_staff === 1 ? true : false,
|
||||
showInfo: !this.state.showInfo,
|
||||
});
|
||||
}).catch(error => {
|
||||
let errMessage = Utils.getErrorMsg(error);
|
||||
toaster.danger(errMessage);
|
||||
});
|
||||
this.isFirstMounted = false;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user