Skip to content

Commit e477464

Browse files
committed
error handling
1 parent a4fb1d1 commit e477464

File tree

9 files changed

+35
-348
lines changed

9 files changed

+35
-348
lines changed

gruntfile.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ const config = {
114114
modules: {
115115
files: active_modules.map((folder) => path.resolve(__dirname, '..', folder) + '/**'),
116116
tasks: ['sync']
117+
},
118+
api: {
119+
files: [path.resolve(__dirname, '..', active_api) + '/**'],
120+
tasks: ['sync']
117121
}
118122
},
119123

src/global/api/README.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/global/api/index.php

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/global/api/recaptchalib.php

Lines changed: 0 additions & 277 deletions
This file was deleted.

src/react/installation-bundle.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,15 @@ const initInitializationBundle = () => {
1515

1616
// append the current page number to all requests
1717
axios.interceptors.request.use((config) => {
18-
const page = navUtils.getCurrentInstallationPage();
19-
if (config.method === 'get') {
20-
config.url += `&page=${page}`;
21-
} else {
22-
config.url += `?page=${page}`;
18+
19+
// if the URL is local (no full path), append the page - it's an internal link within the
20+
if (!(/http/.test(config.url))) {
21+
const page = navUtils.getCurrentInstallationPage();
22+
if (config.method === 'get') {
23+
config.url += `&page=${page}`;
24+
} else {
25+
config.url += `?page=${page}`;
26+
}
2327
}
2428
return config;
2529
}, (error) => Promise.reject(error));
@@ -42,7 +46,7 @@ const initInitializationBundle = () => {
4246
}
4347

4448
return Promise.reject(error);
45-
},
49+
}
4650
);
4751

4852
// boot 'er up. The initialization data is requested on every page (i18n, user info, etc). This request loads as much

src/react/installation/pages/Step5.component.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ class Step5 extends Component {
99
}
1010

1111
render () {
12+
const { errorLoading } = this.props;
13+
14+
if (errorLoading) {
15+
return (
16+
<div>blah.</div>
17+
);
18+
}
19+
1220
return (
1321
<InstallationComponents />
1422
);

0 commit comments

Comments
 (0)