Implement 404 for documents

This commit is contained in:
Jori Lallo
2016-08-03 15:36:50 +03:00
parent 80edf4a693
commit 5b3ed8b1f9
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
import _ from 'lodash';
import { browserHistory } from 'react-router';
import stores from 'stores';
import constants from '../constants';
@@ -57,6 +58,11 @@ class ApiClient {
return response;
}
// Handle 404
if (response.status === 404) {
return browserHistory.push('/404');
}
// Handle 401, log out user
if (response.status === 401) {
stores.user.logout();